Anti-Cheat Bug Help
#1

This anti cheat seems to have a bug that i need ironing out with the help from you guys/girls.

I dont get any errors and it does work when a player has any weapon they get banned.

BUT for some reason when a player joins when someone has cheated and got banned, they are banned. I'm still a beginner at scripting so im not sure whats wrong. Please help me out.

pawn Код:
forward timer();
public timer()
{
    for(new a=0; a<MAX_PLAYERS; a++)
    {
        if(IsPlayerConnected(a))
 {
    if(IsPlayerInAnyVehicle(a))
   {

            }
            else if(GetPlayerWeapon(a) >= 1)
            {
                GetPlayerName(a,pname,MAX_PLAYER_NAME);
                SendClientMessage(a,COLOR_RED,"You have been banned for weapon Cheats!");
                Ban(a);
                format(string,sizeof(string),"Player %s has been banned for using Cheats",pname);
                SendClientMessageToAll(COLOR_RED,string);
                return 1;
            }
            else
            {
                new Float:armour;
                GetPlayerArmour(a, armour);
                if(armour > 0.0)
                {
                  SendClientMessage(a, COLOR_RED, "Armour is not allowed on this server");
                    GetPlayerName(a, pname, MAX_PLAYER_NAME);
                    Ban(a);
                    format(string,sizeof(string),"Player %s has been banned for Armour Cheats",pname);
                    SendClientMessageToAll(COLOR_RED,string);
                }
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Anti-Cheat Bug Help - by indy-greg - 06.09.2009, 16:13
Re: Anti-Cheat Bug Help - by indy-greg - 06.09.2009, 16:16
Re: Anti-Cheat Bug Help - by Joe Staff - 06.09.2009, 16:19
Re: Anti-Cheat Bug Help - by indy-greg - 06.09.2009, 16:33
Re: Anti-Cheat Bug Help - by yeswecanchange09 - 06.09.2009, 20:36
Re: Anti-Cheat Bug Help - by dice7 - 06.09.2009, 20:44
Re: Anti-Cheat Bug Help - by Joe Staff - 07.09.2009, 03:25
Re: Anti-Cheat Bug Help - by indy-greg - 07.09.2009, 17:11
Re: Anti-Cheat Bug Help - by indy-greg - 07.09.2009, 17:35
Re: Anti-Cheat Bug Help - by Ironboy500 - 07.09.2009, 18:43

Forum Jump:


Users browsing this thread: 2 Guest(s)