In recent updates we gave an ability to add custom element to the displayers that will appear in 3rd column. In order to add one follow example below.
Every update needs to be called to the server side in order to apply the change for the player.
In the current version such updates can be hard to do for beginners but we're maintaining the resource.
So, let's say you want to add some custom watermark on the displayers that will display your server name. Headover to the server/components/players.lua and find Players.SetData function.
Inside of that function there's an object data.addon = {} which represents the addon object.
Players.SetData = function(src)
local xPlayer = FrameworkSelected == 'ESX' and ESX.GetPlayerFromId(src) or FrameworkSelected == 'QBCore' and QBCore.Functions.GetPlayer(src) or FrameworkSelected == 'QBOX' and exports['qbox_core']:GetPlayer(source) or false
local data = {}
if not xPlayer then return --[[not possible]] end
if FrameworkSelected == 'ESX' then
data.firstname = xPlayer.variables.firstName
data.lastname = xPlayer.variables.lastName
elseif FrameworkSelected == 'QBOX' or FrameworkSelected == 'QBCore' then
data.firstname = xPlayer.PlayerData.charinfo.firstname
data.lastname = xPlayer.PlayerData.charinfo.lastname
end
data.base = GetBaseRows(src)
data.id = src
data.wallets = GetUserWallets(src)
-- added change
data.addon = {
watermark = {
text = "My Server Name",
icon = "fas fa-server"
}
}
--
Players.GlobalData[tostring(src)] = data
TriggerClientEvent('ZSX_UIV2:Client:PlayerInitialized', src)
debugPrint('[^2PLAYER^7] Succesfully set player data for ['..src..'] ('..GetPlayerName(src)..')')
Player(src).state:set('UI_UserData', data, true)
end
In the above code we've applied data.addon object to show the watermark - simple as that!