SendClientMessageToAll
From SA-MP Wiki
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. |
| Returns | This function always returns 1. |
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp(cmdtext, "/helloworld", true) == 0) { // Send a message to everyone. SendClientMessageToAll(-1, "Hello!"); return 1; } return 0; }
Related Functions
The following functions may be useful, as they are 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.
