Hi how do you added the user_id in the front of the group.Can you please give me like a source code?
well, that’s quite simple. this is my server.lua, see the TriggerClientEvent
for r=1, #cfgcmd do --[[ Anonimo ]]
if sm[1] == cfgcmd[r].cmd then
print(cfgcmd[r].cmd)
if vRP.hasPermission({user_id,cfgcmd[r].permission}) then
iscmd = true
if cfgcmd[r].userdb then
local dbfirstname = identity.firstname
local dbname = identity.name
name = dbfirstname .." "..dbname
end
if cfgcmd[r].anonymous then
name = ""
end
TriggerClientEvent('chatMessage', -1, "[ID:"..user_id.. "] ".. cfgcmd[r].display.." " .. name.." ", { cfgcmd[r].r, cfgcmd[r].g, cfgcmd[r].b }, string.sub(msg,string.len(cfgcmd[r].cmd)+1))
end
end
end
if string.find(sm[1], "/", 1) and not iscmd then
table.remove(sm, 1)
msg = nil
end
if not iscmd and msg ~= nil then
local ing = false
for v=1, #cfgrules do --[[ Pentru grade (ex: Fondator) ]]
if vRP.hasPermission({user_id,cfgrules[v].permission}) then
if cfgrules[v].userdb then
local dbfirstname = identity.firstname
local dbname = identity.name
name = dbfirstname .." "..dbname
end
ing = true
TriggerClientEvent('chatMessage', -1, "[ID:"..user_id.. "] ".. cfgrules[v].display.." " .. name.." ", { cfgrules[v].r, cfgrules[v].g, cfgrules[v].b }, msg)
end
end
if not ing then --[[ Pentru gradul default (civil) ]]
if cfgu.userdb then
local dbfirstname = identity.firstname
local dbname = identity.name
name = dbfirstname .." "..dbname
end
TriggerClientEvent('chatMessage', -1,"[ID:"..user_id.. "] ".. cfgu.display.." " .. name.." ", { cfgu.r, cfgu.g, cfgu.b }, msg)
end
end
Well nevermind, i fixed the double text either. It was quite simple actually, just added a few if-s. Thank you for releasing this super easy to configure script. Really glad i use this instead of rolesfx
poti sa imi dai si pt asta source code mersi mult! si sarbatori fericite
i think we should keep the language in english. anyway, sorry but no. i want to keep that for myself
This is really great and helpful for people like me who do not have the ability to code something themselves that includes the vRP usernames.
Right now I’m having a problem where if I use this with only the default chat resource, it will post twice, once with my steam name and once with my RP name. If I use twitter it’s fine.
I’d also like to see a way to implement proximity chat on the default chat, making twitter the global chat system, and then also a proximity /me that uses vRP usernames?
I spent a couple hours trying to do this but could not accomplish apparently. I appreciate your help!
I’am having an issue, the ooc chat is the only chat working for me, and i keep getting those servidor Msg someone help please!
Ok thanks for help.
Does someone know’s the fix of double text.Please help me
what I put to appear the job? For example: to appear the ID, it is …user_id…
And the job what would it be?
copy paste and your good to go