- Documentation
- Shared functions
- setPlayerBlipColor
Function
setPlayerBlipColor
Changes the colour of a player's map icon (red by default). On the server everyone sees it, on the client the change is local to that player.
Syntax
bool setPlayerBlipColor(player thePlayer, int r, int g, int b [, int a = 255])Arguments
thePlayerplayer- The player.
rint- Red 0-255. On the client
nilrestores the server colour. gint- Green 0-255.
bint- Blue 0-255.
aint, optional = 255- Opacity 0-255.
Returns
true on success.
Example
addEventHandler("onPlayerSpawn", root, function()
local team = getPlayerTeam(source)
if team then
local r, g, b = getTeamColor(team)
setPlayerBlipColor(source, r, g, b)
end
end)