Skip to content

SetPlayerColor

The color 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(pid, color)
Parameter Type
pid number the player
color number 0xRRGGBBAA; 0 = the default

boolean - false when not connected

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

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