SA-MP Forums Archive
anti armour - 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: anti armour (/showthread.php?tid=64052)



anti armour - Schock - 01.02.2009

Code:
public Hack(playerid)
{
	if (AccountInfo[playerid][AdminLevel] >= 1 || IsPlayerAdmin(playerid))
	{
	}
	else
	{
    // i dont know what i have to enter here
	}
}
Code:
//public OnGameModeInit()
 SetTimer("Hacktimer", 3000, 1);
can someone help me?
i want that if a player have more than 1 armour get kicked and admin not (you see in code)


Re: anti armour - Nero_3D - 01.02.2009

pawn Code:
//OnGameModeInit
SetTimer("Hack", 3000, true);
pawn Code:
forward Hack();
public Hack()   for(new i, Float:fl; i < MAX_PLAYERS; i++)
                    if((AccountInfo[i][AdminLevel] >= 1 || IsPlayerAdmin(i)) == false)
                        if(GetPlayerArmour(i, fl) && fl > 0.0) Kick(i);



Re: anti armour - Schock - 01.02.2009

i see my error but how to use it that the admin wont kicked ...
Code:
public Hack()
{
  for(new i, Float:fl; i < MAX_PLAYERS; i++)
  {
     if((AccountInfo[i][AdminLevel] >= 1 || IsPlayerAdmin(i)) == false)
 	 {
 	 }
 	 if(GetPlayerArmour(i, fl) && fl > 0.0)
 	 {
 	 Kick(i);
 	 }
  }
  return 1;
}



Re: anti armour - Schock - 01.02.2009

done by myself ~CLOSED~