Teams on radar
#8

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.
Reply


Messages In This Thread
Teams on radar - by cruising - 03.08.2011, 14:40
Re: Teams on radar - by Virtual1ty - 03.08.2011, 14:53
Re: Teams on radar - by Patrik356b - 03.08.2011, 14:58
Re: Teams on radar - by cruising - 03.08.2011, 16:10
Re: Teams on radar - by cruising - 05.08.2011, 13:23
Re: Teams on radar - by =WoR=Varth - 06.08.2011, 01:46
Re: Teams on radar - by cruising - 08.08.2011, 21:36
Re: Teams on radar - by Grim_ - 08.08.2011, 21:59
Re: Teams on radar - by cruising - 08.08.2011, 22:10
Re: Teams on radar - by Grim_ - 08.08.2011, 22:11
Re: Teams on radar - by cruising - 08.08.2011, 22:19
Re: Teams on radar - by Grim_ - 08.08.2011, 22:21
Re: Teams on radar - by cruising - 08.08.2011, 22:26

Forum Jump:


Users browsing this thread: 1 Guest(s)