Skip to content

SetPlayerColour

The colour of the player’s label and of their name in the Tab roster.

0xRRGGBBAA; 0 puts the default back. The alpha byte matters - 0x4080FF00 is invisible. SetPlayerColor is the same function.

SetPlayerColour(pid, colour)
Parameter Type
pid number the player
colour number 0xRRGGBBAA; 0 = the default

boolean - false when not connected

-- /colour rrggbb
local rgb = tonumber(args:match("^%s*#?(%x%x%x%x%x%x)%s*$") or "", 16)
SetPlayerColour(pid, rgb and (rgb * 256 + 255) or 0)

GetPlayerColour · SetPlayerNameplate · SetPlayerTeam · the Players group of the index