Skip to content

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.

SendClientMessage(pid, colour, text)
Parameter Type
pid number the player
colour number 0xRRGGBBAA
text string the line

boolean - false when not connected

SendClientMessage(pid, COLOUR_RED, "You cannot do that here.")
SendClientMessage(pid, COLOUR_SERVER, string.format("%d player(s) online", GetPlayerCount()))

SendClientMessageToAll · GameText · Log · the Chat and commands group of the index