SendClientMessageToAll
From SA-MP
[edit]
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.
[edit]
Parameters:
(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 that is connected. SendClientMessageToAll(0xDEEE20FF, "Hello."); return 1; } }
[edit]
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 client message to a certain player.
- SendPlayerMessageToAll: Send a player-message to everyone connected.
- SendPlayerMessageToPlayer: Send a player-message to a certain player.
