SetPlayerMarkerForPlayer

SetPlayerMarkerForPlayer

Description:
Function SetPlayerMarkerForPlayer change the colour of a player's nametag and radar blip for another player.


Parameters:
(playerid, showplayerid, color)
int playerid The player that will see the player's changed blip/nametag color.
int showplayerid The player whose color will be changed.
int color New color. Supports alpha values.


Return Values:
  • 1: The function was executed successfully.
  • 0: The function failed to execute. This means the player specified does not exist.


Examples:
// Make player 42 see player 1 as a red marker
SetPlayerMarkerForPlayer( 42, 1, 0xFF0000FF );
 
// Make the players marker an invisible white (chat will be white but marker will be gone).
SetPlayerMarkerForPlayer( 42, 1, 0xFFFFFF00 );
 
// Make the players marker invisible to the player while keeping chat colour the same. Will only work correctly if SetPlayerColor has been used:
SetPlayerMarkerForPlayer( 42, 1, ( GetPlayerColor( 1 ) & 0xFFFFFF00 ) );
 
// Make the players marker fully opaque (solid) to the player while keeping chat colour the same. Will only work correctly if SetPlayerColor has been used:
SetPlayerMarkerForPlayer( 42, 1, ( GetPlayerColor( 1 ) | 0x000000FF ) );


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