SendClientMessageToAll
From SA-MP Wiki
SendClientMessageToAll
This function can be used to send a message to all players connected, specifying both the message the players will receive as the colour in which the message should show up. This is a multiple-user equivalent of SendClientMessage.
(color, const message[])
| color | The color it should be in. Should be in HEX-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, "/msgall", true) == 0) { // Send a message to everyone. SendClientMessageToAll(0xDEEE20FF, "Hello."); return 1; } return 0; }
Related Functions
The following functions might be useful as well, as they're related to this function in one way or another.
- SendClientMessage: Send a message to a certain player.
- SendPlayerMessageToAll: Force a player to send text for all players.
