rhys19
31
TriggerEvent('es:addCommand', 'do', function(source, args, user)
table.remove(args, 1)
TriggerClientEvent('chatMessage', -1, "", {255, 0, 0}, "^6 " .. GetPlayerName(source) .." ".."^3< " .. table.concat(args, " ")) -- you may change the "^3< <-- that to whatever you want and the ^3 is gold color!
end)
TriggerEvent('es:addCommand', 'me', function(source, args, user)
table.remove(args, 1)
TriggerClientEvent('chatMessage', -1, "", {255, 0, 0}, "^6 " .. GetPlayerName(source) .." ".."^3> " .. table.concat(args, " ")) -- again you can change the > to whatever you want!
end)
-- Stringsplit for FX --
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
__resource.lua:
resource_manifest_version "44febabe-d386-4d18-afbe-5e627f4af937"
description 'MGCRP Me Command'
server_scripts {
"server.lua"
}
or the files if your lazy 
__resource.lua (136 Bytes)
server.lua (947 Bytes)