Quote:
Originally Posted by Grim_
pawn Код:
public OnPlayerSpawn( playerid ) { for( new i = 0; i < MAX_PLAYERS; i++ ) { if( !IsPlayerConnected( i ) || i == playerid ) continue; if( GetPlayerTeam( playerid ) != GetPlayerTeam( i ) ) { ShowPlayerMarkerForPlayer( playerid, i, 0xFFFFFF00 ); ShowPlayerMarkerForPlayer( i, playerid, 0xFFFFFF00 ); // Hide the player's marker from someone on the other team, and vice-versa } } return 1; }
Note that this will also make the color of the player's name in the chat white. If you want to have a consistent color inside the chat, you'll have to make sure you previous used SetPlayerColor, and use this code:
pawn Код:
SetPlayerMarkerForPlayer( playerid, i, ( GetPlayerColor( 1 ) & 0xFFFFFF00 ) ); SetPlayerMarkerForPlayer( i, playerid, ( GetPlayerColor( 1 ) & 0xFFFFFF00 ) );
Also make sure ShowPlayerMarkers is set to 1 inside OnGameModeInit.
|
When i put this in my scrip ill get
pawn Код:
error 017: undefined symbol "ShowPlayerMarkerForPlayer
error 017: undefined symbol "ShowPlayerMarkerForPlayerr
and when i define the first one ill get 2 of these warnings instead on ShowPlayerMarkerForPlayer line