I want that command to be used only for that job. How?

For esx framework and client side use this,

RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', function(xPlayer)
	ESX.PlayerData = xPlayer
end)

RegisterNetEvent('esx:setJob')
AddEventHandler('esx:setJob', function(job)
	ESX.PlayerData.job = job
end)

and for job name
ESX.PlayerData.job.name

thank you

So where do I put it?

[image]

RegisterNetEvents to the top and “ESX.PlayerData.job.name” into RegisterCommand If you can’t, send your full code I can help

AP29_Chat.rar (17.0 KB) help me pls

Client,
main.lua (1014 Bytes)
Server,
main.lua (6.2 KB)

If you want to apply it to other commands, just look at “RegisterCommand (‘po’, function (source, args, rawCommand)” and apply to others

thx luv u