[Release] Chat Roles [UPDATED 5/30/18] [Tutorial Released]

Not sure if your still having the issue but if you remove line 98 print(‘Jay’s Roles FX has loaded in to the server! Type in chat to test it out!’) it will fix your issue!

ill fix it (char limit)

There ya go. its fixed

1 Like

Thanks was just a little issue that was causing it not to work and most people that are new wont understand the issue!

All good, thanks for pointing it out

@JayJayAuto Hi man, my chat is getting duplicated when I write ???
as I was reading above some people had this problem, and you answered that there are conflicting scripts, but I only have regular fiveM chat and rolesfx and cars ONLY.

If you use my resource called Hide Commands that will be your issue…

Thx mannn <33333333 33333333333

Installed it, changed my role to director but I still show up as a civilian and it duplicates the chat? Need help, thanks!

conflicting script…

it tells me when i try to join:
could not load rolesFX

How can i add multiple people to one role

I’m not gonna answer a stupid question, it’s shown how to do it

Download a fresh copy

well ok then im just not going to use the script since the disrespect to others is all over fivem and dont worry about responding

Hey @JayJayAuto,

I’ve downloaded your script. Read about it, seems pretty good. I have it installed, configured it properly. I have it set up correctly and added it to my “server.cfg” and I load up my server and it does not work nor load…

Here is my file:

--- DO NOT REMOVE ME FROM THE CONFIG, ITS THERE TO GIVE ME CREDIT WHEN I JOIN SERVERS.
--- DO NOT REMOVE ME FROM THE CONFIG, ITS THERE TO GIVE ME CREDIT WHEN I JOIN SERVERS.
--- DO NOT REMOVE ME FROM THE CONFIG, ITS THERE TO GIVE ME CREDIT WHEN I JOIN SERVERS.
--- DO NOT REMOVE ME FROM THE CONFIG, ITS THERE TO GIVE ME CREDIT WHEN I JOIN SERVERS.
--- DO NOT REMOVE ME FROM THE CONFIG, ITS THERE TO GIVE ME CREDIT WHEN I JOIN SERVERS.
--- IP'S ARE BROKEN DO NOT USE
--- IP'S ARE BROKEN DO NOT USE
--- IP'S ARE BROKEN DO NOT USE
--- IP'S ARE BROKEN DO NOT USE
--- IP'S ARE BROKEN DO NOT USE



local Owner = {"steam:","ip:127.0.0.1",}
local CoOwner = {"steam:","ip:",}
local Admin = {"steam:","ip:",}
local Moderator = {"steam:","ip:",}
local Fire = {"steam:","ip:",}
local Police = {"steam:","ip:",}
local Developer = {"steam:11000011777fe52","ip:",}
local EMT = {"steam:","ip:",}
local Test = {"steam:","ip:",}
local ScriptCreator = {"steam:110000108ce69e8","ip:",}


AddEventHandler('chatMessage', function(Source, Name, Msg)
    args = stringsplit(Msg, " ")
    CancelEvent()
    if string.find(args[1], "/") then
        local cmd = args[1]
        table.remove(args, 1)
    else
        local player = GetPlayerIdentifiers(Source)[1]
        if has_value(Owner, player) then
            TriggerClientEvent('chatMessage', -1, "Owner | " .. Name, { 255, 0, 0 }, Msg)
        elseif has_value(CoOwner, player) then
            TriggerClientEvent('chatMessage', -1, "Co - Owner | " .. Name, { 255, 0, 0 }, Msg)
        elseif has_value(Admin, player) then
            TriggerClientEvent('chatMessage', -1, "Admin | " .. Name, { 0, 0, 255 }, Msg)
        elseif has_value(Moderator, player) then
            TriggerClientEvent('chatMessage', -1, "Moderator | " .. Name, { 0, 0, 255 }, Msg)
        elseif has_value(Fire), player) then
            TriggerClientEvent('chatMessage', -1, "Fire | " .. Name, { 0, 0, 255 }, Msg)
        elseif has_value(Police, player) then
            TriggerClientEvent('chatMessage', -1, "Police | " .. Name, { 0, 0, 255 }, Msg)
	    elseif has_value(Developer, player) then
            TriggerClientEvent('chatMessage', -1, "Developer | " .. Name, { 0, 255, 247 }, Msg)
        elseif has_value(EMT, player) then
            TriggerClientEvent('chatMessage', -1, "EMT | " .. Name, { 222, 0, 255 }, Msg)
		elseif has_value(Test, player) then
            TriggerClientEvent('chatMessage', -1, "State Troopers | Admin " .. Name, { 222, 0, 255 }, Msg)
		elseif has_value(ScriptCreator, player) then
            TriggerClientEvent('chatMessage', -1, "Chat Roles Creator | " .. Name, { 0, 255, 43 }, 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(inputstr, sep)
    if sep == nil then
        sep = "%s"
    end
    local t={} ; i=1
    for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
        t[i] = str
        i = i + 1
    end
    return t
end

---ALLOWS YOU TO CHECK VERSIONS IN GAME

AddEventHandler('chatMessage', function(source, name, msg)
  if msg:sub(1, 1) == "/" then
    sm = stringsplit(msg, " ");
	   if sm[1] == "/fversion" then
		     CancelEvent()
	TriggerClientEvent('chatMessage', source, "^0[^1RolesFX Script Version Check^0]", {30, 144, 255}, " ^2Version 1.1.0 | RolesFX By Jay Gatsby!^0 ) " .. string.sub(msg,11))
     end
  end

end)

---PRINTS THIS CODE BELOW TO THE CONSOLE

print('Jays Roles FX has loaded in to the server! Type in chat to test it out!')

--- IP'S ARE BROKEN DO NOT USE
--- IP'S ARE BROKEN DO NOT USE
--- IP'S ARE BROKEN DO NOT USE
--- IP'S ARE BROKEN DO NOT USE
--- IP'S ARE BROKEN DO NOT USE
--- IP'S ARE BROKEN DO NOT USE
--- IP'S ARE BROKEN DO NOT USE
--- IP'S ARE BROKEN DO NOT USE
--- IP'S ARE BROKEN DO NOT USE
--- IP'S ARE BROKEN DO NOT USE
--- IP'S ARE BROKEN DO NOT USE

Please help!

P.S. I deleted vRP for it to work, still did not work.

Try typing the command in there, this script doesn’t work on custom chats

Not my loss… good luck

can someone tell me how i can made the player id to show up in the chat ?

fail to load server resource