SendClientMessageToAll

From SA-MP Wiki

Jump to: navigation, search


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.


ReturnsThis 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.

Personal tools