SetPlayerColor
From SA-MP
[edit]
SetPlayerColor
This function allows you to change the color of a player currently in-game.
(playerid,colour)
| playerid | The player you want to change the color of. |
| color | The new player's color, as an integer. |
This function does not return a specific value, it's best to simply ignore it.
//using hex notation: SetPlayerColor(playerid, 0xFFFF00AA); //using decimal notation: SetPlayerColor(playerid, 4294901930);
Hex and decimal values can be converted in each other, e.g. by using Windows' Calculator (advanced interface)
[edit]
Related Functions
The following functions might be useful as well, as they're related to this function in one way or another.
- GetPlayerColor: Retrieve the color of a player.
- SetPlayerTeam: Set the team of a player.
