SendClientMessage
From SA-MP
[edit]
SendClientMessage
This function can be used to send a message to a certain player, while specifying the colour of the message as well as the message itself and the receiving player. The whole line in the chatbox will be in the same color.
(playerid, color, const message[])
| playerid | The playerid you would like to send it to. |
| color | The color it should be in. Should be in PAWNO color format. |
| const message[] | The string of text you would like to send. |
This function does not return a specific value, it's best to simply ignore it.
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/msgme", true) == 0) { SendClientMessage(playerid, 0xDEEE20FF, "Hello."); // Send a message to the player that submitted the command return 1; } return 0; }
[edit]
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 client message to everyone connected.
- SendPlayerMessageToPlayer: Send a player-message to another player.
