SendClientMessageToAll

From SA-MP

Jump to: navigation, search


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.


Parameters:

(color, const message[])
colorThe 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;
	}
}

Related Functions

The following functions might be useful as well, as they're related to this function in one way or another.

Personal tools