SetPlayerColor

From SA-MP Wiki

(Redirected from Function:SetPlayerColor)
Jump to: navigation, search


Description:

Set the colour of a player's nametag and marker (radar blip).


Parameters:
(playerid, color)
playeridThe ID of the player whose color to set.
colorThe color to set. Supports alpha values.


Return Values:

This function does not return any specific values.


Image:32px-Ambox_warning_orange.png

Notes

  • This function will change player's color for everyone, even if player's color was changed with SetPlayerMarkerForPlayer for any other player.
  • If used under OnPlayerConnect, the affecting player will not see the color in the TAB menu.


Example Usage:

// Red, using hexadecimal notation:
SetPlayerColor(playerid, 0xFF0000FF);
 
//Red, using decimal notation:
SetPlayerColor(playerid, 4278190335);

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

Personal tools