Banning Spammers
#3

Hey can you add it for me? i am getting a lot of errors here is the hole anti thing
pawn Код:
public AntiCheat()
{
    for(new playerid; playerid<MAX_PLAYERS; playerid++)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerLogged[playerid] == 1 && PlayerSpawned[playerid] == 1 && PInfo[playerid][AdminLevel] == 6)
            {
                new wep = GetPlayerWeapon(playerid);
                if(wep==1||wep==2||wep==3||wep==4||wep==5||wep==6||wep==7||wep==8||wep==9||wep==10||wep==11||wep==12||wep==13||wep==14||wep==15||wep==16||wep==17||wep==18||wep==22||wep==23||wep==24||wep==25||wep==26||wep==27||wep==28||wep==29||wep==30||wep==31||wep==32||wep==33||wep==34||wep==35||wep==36||wep==37||wep==38||wep==39||wep==40||wep==41||wep==42||wep==43||wep==44||wep==45)
                {
                   BanUser(playerid, "Weapon hacks", "Johnny");
                }
                new Float:Armour;
                GetPlayerArmour(playerid, Armour);
                if(Armour > 0)
                {
                    BanUser(playerid, "Armour hacks", "Johnny");
                }
                if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
                {
                    if(PInfo[playerid][AdminLevel] >= 0)
                    BanUser(playerid, "Jetpack hacks", "Johnny");
                }
                if(IsPlayerInAnyVehicle(playerid))
                {
                    new vehicleid = GetPlayerVehicleID(playerid);
                    if(vfuel[vehicleid] > 0)
                    {
                        new speed = floatround(GetVehicleSpeed(vehicleid, 0), floatround_round);
                        if(speed > 239 && PInfo[playerid][TotalScore] < 10) //240 mph && under 10 score
                        {
                            BanUser(playerid, "Speed hack", "Johnny");
                        }
                        else if(speed > 205) //210 mph
                        {
                            new string[156];
                            format(string,sizeof(string),"[SPEED WARNING] %s(%d) is going %d MPH! /spec them!", PlayerName(playerid), playerid, speed);
                            SendAdminMessage(COLOR_ADMIN, string);
                        }
                    }
                }
            }
        }
    }
}
Reply


Messages In This Thread
Banning Spammers - by Geeboi_Mehdi - 23.05.2013, 23:32
Re: Banning Spammers - by DobbysGamertag - 24.05.2013, 00:04
Re: Banning Spammers - by Geeboi_Mehdi - 24.05.2013, 00:17

Forum Jump:


Users browsing this thread: 2 Guest(s)