How i can send a chat message only to one player?

Hello,

i have a question about the Fivereborn chat.
How i can send a command message to a player? [not global message]

try /tell

1 Like

TriggerClientEvent(‘chatMessage’, id, title, {r, g, b}, msg)

@0x420 can i use that on the playerSpawned event?

My code doesn’t working!

You need to change the r, g and b values. They represent colors in RGB format. Try 255, 255, 255 for white.

Also, the space and : are automatically added.

@0x420 It’s not work!

TriggerEvent(‘chatMessage’, ‘Server’, {255, 255, 255}, text)

As you’re doing this on the client, trigger a local event. The line I posted only works from the server

@0x420 It’s works! Thank you!

If you just want to send a message to player connected to your server from the server itself. You can use the command SAY and then type your message. This is great for announcing restarts or other events when you’re not in game.

1 Like