17.08.2011, 07:55
Personally I would make something like this
I hope this is what you want, and sorry for pressing Submit Post accidentally.
pawn Код:
public OnPlayerSpawn( playerid )
{
foreach (Player,i)
{
if ( Member[ playerid ] == Member[ i ] )
continue;
SetPlayerMarkerForPlayer( i, playerid, ( GetPlayerColor( playerid ) & 0xFFFFFF00 ) ); // Invisible
}
gradar[ playerid ] = 1; // Radar turned off for other teams.
return 1;
}
CMD:radar( playerid, params[ ] )
{
if ( !gradar[ playerid ] )
{
gradar[ playerid ] = 1;
foreach (Player, i)
{
if ( Member[ playerid ] == Member[ i ] )
continue;
SetPlayerMarkerForPlayer( i, playerid, ( GetPlayerColor( playerid ) & 0xFFFFFF00 ) ); // Invisible for other teams.
}
}
else
{
gradar[ playerid ] = 0;
foreach (Player, i)
{
SetPlayerMarkerForPlayer( i, playerid, GetPlayerColor( playerid ) ); // Visible for other teams.
}
}
return 1;
}