View Single Post
Old 18/12/2009, 03:39 AM   #4
FreshKilla
Big Clucker
 
FreshKilla's Avatar
 
Join Date: Feb 2008
Location: Canada
Posts: 126
Reputation: 8
Default Re: Simple Anticheat Check not working

Id rather do it like this:

pawn Code:
public AntiCheat()
{
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
    if(ADMIN[i] == false)
    {
      if(GetPlayerWeapon(i) == 42)
      {
        new string [128];
        new pName[MAX_PLAYER_NAME];
        GetPlayerName(i, pName, sizeof(pName));
        format(string, sizeof(string), "BANNED: %s has been auto banned by console.", pName);
        SendClientMessageToAll(0xFF0000FF, string);
        BanEx(i, "AntiCheat");
      }
      else if(GetPlayerWeapon(i) == 1)
      {
        new string [128];
        new pName[MAX_PLAYER_NAME];
        GetPlayerName(i, pName, sizeof(pName));
        format(string, sizeof(string), "BANNED: %s has been auto banned by console.", pName);
        SendClientMessageToAll(0xFF0000FF, string);
        BanEx(i, "AntiCheat");
      }
    }
  }
  return 1;
}
FreshKilla is offline