//global variable
new set_markers;
public OnPlayerConnect( playerid )
{
if( set_markers == 1 )
{
for( new i = 0; i < MAX_PLAYERS; i++ )
{
if( !IsPlayerConnected( i ) ) continue;
ShowPlayerMarkerForPlayer( i, playerid, 0xFFFFFF00 ); // Have 'i' radar hide playerid marker
ShowPlayerMarkerForPlayer( playerid, i, 0xFFFFFF00 ); // Have 'playerid' radar hide i marker
}
}
return 1;
}
ZCMD:markers( playerid, params[ ] )
{
if( !IsPlayerAdmin( playerid ) ) return 1;
for( new i = 0; i < MAX_PLAYERS; i++ )
{
if( !IsPlayerConnected( i ) ) continue;
for( new z = 0; z < MAX_PLAYERS; z++ )
{
if( !IsPlayerConnected( z ) ) continue;
if( i == z ) continue;
ShowPlayerMarkerForPlayer( i, z, 0xFFFFFF00 );
ShowPlayerMarkerForPlayer( z, i, 0xFFFFFF00 );
}
}
set_markers = 1;
return 1;
}
COMMAND:markers( playerid, params[ ] )
{
if( !IsPlayerAdmin( playerid ) ) return 1;
LimitPlayerMarkerRadius( 0.1 );
return 1;
}
Mkay, I was wondering if it's possible to do an admin command which disables the blips for all players in the minimap?
And if that's not possible then is it possible to script a command for yourself what makes other people's blips disappear. |
// OnPlayerCommandText
if(!strcmp(cmdtext, "/blipsoff", true))
{
if(GetPVarInt(playerid, "Admin"))
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
for(new j = 0; j < MAX_PLAYERS; j++)
{
if(IsPlayerConnected(j) && j != i)
{
SetPlayerMarkerForPlayer(i, j, 0x00000000);
}
}
}
}
}
else return SendClientMessage(playerid, -1, "[ERROR]: You are not an admin !");
}