SendClientMessage
From SA-MP Wiki
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 set color unless colour embedding is used with 0.3c or later.
(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. max len displayable: 144 |
| Returns | This function doesn't return a specific value |
public OnPlayerConnect(playerid) { SendClientMessage(playerid, COLOR_GREEN, "Welcome to my server!"); return 1; }
| Note: Use color embedding for multiple colors in the text. |
Related Functions
The following functions may be useful, as they are 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.
- SendPlayerMessageToAll: Force a player to send text for all players.
