SendClientMessage

From SA-MP

Jump to: navigation, search


SendClientMessage

This function can be used to send a message to a certain player, while specifying the colour of the message as well as the message itself and the receiving player. The whole line in the chatbox will be in the same color.


(playerid, color, const message[])
playeridThe playerid you would like to send it to.
colorThe color it should be in. Should be in PAWNO 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, "/msgme", true) == 0) {
        SendClientMessage(playerid, 0xDEEE20FF, "Hello."); // Send a message to the player that submitted the command
        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.

Personal tools