Skip to content

SendClientMessage

A line in one player’s chat.

The line appears in the player’s chat window in color (0xRRGGBBAA; the color constants name the usual ones). Long lines wrap; keep them to a sentence or two. A text over 16384 bytes of UTF-8 is cut at that size - the server log says so once after the mode loads - so a line built without a bound cannot break the chat.

It is the one-colour, one-channel form of SendChatMessage, and unlike that function it cuts a long text where SendChatMessage refuses one over 512 characters.

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

boolean - false when not connected

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

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