Broadcast message to everyone after a command has been entered


#1

I am currently experimenting with LUA and I am trying to figure out how to globally send a message to everyone via chat. This is for the /me command. Any help is appreciated. cheers.


#2

Add a command handler, then put
if (command[1] == ‘/me’) then
TriggerClientEvent(‘chatMessage’, -1, GetPlayerName(source), { r, g, b }, command[2])
end

-1 triggers an event for all clients