SendClientMessage

From SA-MP Wiki

Jump to: navigation, search

SendClientMessage


This function can be used to send a message to a certain player with any chosen color. The whole line in the chatbox will be in the same color.


Parameters:
(playerid, color, const message[])
playeridThe playerid you would like to display the message for.
colorThe color it should be in.
const message[]The text you would like to display.
This function does not return a specific value, it's best to simply ignore it.


public OnPlayerConnect(playerid)
{
    SendClientMessage(playerid, COLOR_GREEN, "Welcome to my server!");
    return 1;
}

Related Functions

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


Related Callbacks

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

  • OnPlayerText: Called when a player sends a message via the chat.
Personal tools