SendClientMessage
A line in one player’s chat.
The line appears in the player’s chat window in colour (0xRRGGBBAA; the colour
constants name the usual ones). Long lines wrap; keep them to a sentence or two.
Syntax
Section titled “Syntax”SendClientMessage(pid, colour, text)| Parameter | Type | |
|---|---|---|
pid |
number | the player |
colour |
number | 0xRRGGBBAA |
text |
string | the line |
Returns
Section titled “Returns”boolean - false when not connected
Example
Section titled “Example”SendClientMessage(pid, COLOUR_RED, "You cannot do that here.")SendClientMessage(pid, COLOUR_SERVER, string.format("%d player(s) online", GetPlayerCount()))See also
Section titled “See also”SendClientMessageToAll · GameText · Log · the Chat and commands group of the index
