First, find on configuration and check your framework in use:
(Can be any framework, just remember the name)
--- Current Supported options:
--- 'esx' ES Extended
--- 'qb' QB-Core
--- 'standalone' Standalone configuration
Config.Framework = "standalone"
Next, check the configuration and search for and use the next settings:
-- For exmple: AlexBanPer #1 - Test Name #1
-- Only if are friends.
Config.FriendAPI_UseIdAfterHeadName = true
--- If Config.FriendAPI_UseIdAfterHeadName is true, then PlayerServerId will be used; otherwise, a custom player ID can be set.
--- This funcion includes 'Unknown' text if player is not friends.
Config.FriendAPI_UseCustomIdAfterHeadName = true
-- On friendship request display SteamName or 'getUserHeadName' function
Config.FriendAPI_UseUserHeadNameInsteadSteamNameOnFriendRequest = true
Depending on which framework we will use before, we will look in
'server/custom/{framework}.lua'
--- For this example
'server/custom/standalone.lua'
Find functions:
-------------------------------
-- In this function you can set it to fetch the player id, for example if you have an id corresponding to "#abc123" then you should use some function to get the player id and it will be displayed overhead.
function GetCustomHeadText(playerId)
return GetPlayerName(playerId) .. " | " .. tostring(math.random(1000, 9999))
end
---- WIP
function GetCustomUnknownHeadText(playerId)
return "Custom " .. Translate("UNKNOWN") .. " | " .. tostring(playerId)
end
------------------
So you can set up these functions for your custom IDs (for example, custom database ID, player ID, etc)