SendClientMessage
From SA-MP Wiki
SendClientMessage
This function can be used to send a message to a certain player with any chosen color. The whole line in the chatbox will be in the same color.
(playerid, color, const message[])
| playerid | The playerid you would like to display the message for. |
| color | The color it should be in. |
| const message[] | The text you would like to display. |
This function does not return a specific value, it's best to simply ignore it.
public OnPlayerConnect(playerid) { SendClientMessage(playerid, COLOR_GREEN, "Welcome to my server!"); return 1; }
Related Functions
The following functions might be useful as well, as they're related to this function in one way or another.
- SendClientMessageToAll: Send a message to all players.
- SendPlayerMessageToPlayer: Force a player to send text for one player.
Related Callbacks
The following callbacks might be useful, as they're related to this function in one way or another.
- OnPlayerText: Called when a player sends a message via the chat.
