SA-MP Forums Archive
Help Pdradar command turns all cops names blue - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help Pdradar command turns all cops names blue (/showthread.php?tid=104839)



Help Pdradar command turns all cops names blue - Los Santos RP - 26.10.2009

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

thanks

Code is:

Код:
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;
	}