So I am using the code provided by Doj /me
The only issue is, in order for it to display the message you have to type somthing in the middle
E.G /me hello Grabs camera
Outputs Atexx <: | Grabs camera
Can anyone help me fix the code that way I only have to do
/me Grabs camera
Thanks!
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