as the title says i have this command but it doesn't work properly it turns all players names blue. could you please fix it so just cops names are blue
Код:
if(strcmp(cmd, "/pdradar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gTeam[playerid] == 2 || IsACop(playerid))
{
for(new i;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
if(gTeam[playerid] == 2 || IsACop(playerid))
SetPlayerMarkerForPlayer(playerid, i, COLOR_BLUE);
}
}
SendClientMessage(playerid, COLOR_WHITE, " Radar markers turned on for all on duty Cops!");
SendClientMessage(playerid, COLOR_WHITE, " NOTE: You may need to /pdradar again when more police log on.");
}
else
{
SendClientMessage(playerid, COLOR_WHITE, " You must be a cop!");
return 1;
}
}
return 1;
}