[Need Link] Script

Hi! I’m looking for the script that lists player ranks in chat. So for example it would say [Sheriff] HomeGoods next to my name in-game. I’m looking for this script.

https://forum.cfx.re/t/custom-chat-roles-update/8701/58

local Admin = {"steam:[YOUR-ID-HERE]","ip:[YOUR-IP-HERE]",}
local Police = {}
local Fire = {}
local EMS = {}
local Sheriff = {}

AddEventHandler('chatMessage', function(Source, Name, Msg)
    args = stringsplit(Msg, " ")
    CancelEvent()
    if string.find(args[1], "/") then
        local cmd = args[1]
        table.remove(args, 1)
        TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Command: ".. cmd .. " | Additional: " .. table.concat(args, " "))
    else     
        local player = GetPlayerIdentifiers(Source)[1]
        if has_value(Admin, player) then
            TriggerClientEvent('chatMessage', -1, "Admin | " .. Name, { 255, 0, 0 }, Msg)
        elseif has_value(Police, player) then
            TriggerClientEvent('chatMessage', -1, "Police | " .. Name, { 0, 0, 255 }, Msg)
        elseif has_value(Fire) then
            TriggerClientEvent('chatMessage', -1, "Fire | " .. Name, { 0, 0, 255 }, Msg)
        elseif has_value(EMS, player) then
            TriggerClientEvent('chatMessage', -1, "EMS | " .. Name, { 0, 0, 255 }, Msg)
        elseif has_value(Sheriff, player) then
            TriggerClientEvent('chatMessage', -1, "Sheriff | " .. Name, { 0, 0, 255 }, Msg)
        else
            TriggerClientEvent('chatMessage', -1, "Civilian | " .. Name, { 235, 214, 51 }, Msg)
        end
            
    end
end)

function has_value (tab, val)
    for index, value in ipairs(tab) do
        if value == val then
            return true
        end
    end

    return false
end

function stringsplit(self, delimiter) -- A function
    local a = self:Split(delimiter) -- Splits the string.
    local t = {} -- Creates a table

    for i = 0, #a - 1 do -- For loop to loop through all the arguments.
        table.insert(t, a[i]) -- Inserts the arguments into a table
    end

    return t -- Returns the table
end

Do you need the steam id or only one of them also if it is only ip what ip external or internal ip

I use both, so if I’ve not got steam running it still recognises me - the best thing though would be to enable authentication on your server so that everyone needs to have steam open when joining your server. That way everyone’s stuff will be the same each time i.e steam ID

Thanks
i will try that