05.03.2014, 15:32
(
Последний раз редактировалось XK; 05.03.2014 в 16:05.
)
ok i have made this in 3 minutes,test it:
And add in player info...visible and disable...
pawn Код:
if(strcmp(cmd, "/visible", true) == 0)
{
if(PlayerInfo[playerid][visible] == 0)
{
PlayerInfo[playerid][visible] = 1;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][disable] == 1) SetPlayerMarkerForPlayer(i, playerid, GetPlayerColor(playerid));
if(PlayerInfo[i][disable] == 0) SetPlayerMarkerForPlayer(i, playerid, 0xFFFFFF00);
}
}
}
if(PlayerInfo[playerid][visible] == 1)
{
PlayerInfo[playerid][visible] = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SetPlayerMarkerForPlayer(i, playerid, 0xFFFFFF00);
}
}
}
return 1;
}
if(strcmp(cmd, "/disablemarkers", true) == 0)
{
if(PlayerInfo[playerid][disable] == 1)
{
PlayerInfo[playerid][disable] = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][visible] == 1) SetPlayerMarkerForPlayer(playerid, i, GetPlayerColor(playerid));
if(PlayerInfo[i][visible] == 0) SetPlayerMarkerForPlayer(playerid, i, 0xFFFFFF00);
}
}
}
if(PlayerInfo[playerid][disable] == 0)
{
PlayerInfo[playerid][disable] = 1;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SetPlayerMarkerForPlayer(playerid, i, 0xFFFFFF00);
}
}
}
return 1;
}