Hello so I need The roles in the chat like /p 0 ON SERVICE but for the jobs like in this image just to let the people from that job put that on the chat
AddEventHandler('chatMessage', function(source, name, msg)
local name = GetPlayerName(source)
local playerNick = GetPlayerName(source)
sm = stringsplit(msg, " ");
if string.find(sm[1], "/") then
else
if sm[1] then
CancelEvent()
xPlayer = ESX.GetPlayerFromId(source)
str = xPlayer.job.name
job = str:gsub("^%l", string.upper)
TriggerClientEvent('chatMessage', -1, "^7[ ^4".. job .. " ^7]^7 ^3" .. name .. "^2(".. source ..")^2 ", { 255, 0, 0 }, string.sub(msg,0))
end
end
end)
dropp this an chat or - esx_Chat