Anti Fail
#1

pawn Код:
#if defined AntiWeap
public OnPlayerUpdate(playerid)
{
    if(PlayerInfo[playerid][Level] >= 2 && IsPlayerAdmin(playerid))
    {
        return 1;
    }
    else if(GetPlayerInterior(playerid) == 1 && 4 && 6 && 7)
    {
        return 1;
    } else if(GetPlayerInterior(playerid) == 0){
        new weapon, ammo, str[128];
        GetPlayerWeaponData(playerid, 7, weapon, ammo);
        if(GetPlayerWeapon(playerid) == >= 1 && <= 39)
        {
            format(str, sizeof(str), "[FrosTiC AnTi]: %s (%d) has been Kicked by FrosTiC AnTi CheaT. (Reason: Weapon Hacks)",PlayerName(playerid),playerid);
            format(strtofile, sizeof(strtofile), "%s (%d) has been Kicked by FrosTiC AnTi CheaT. (Reason: Weapon Hacks)",PlayerName(playerid),playerid);
            SendClientMessageToAll(pink, str);
            SaveToFile(AntiCheat, string);
            Kick(playerid);
        }
    }
    return 1;
}
#endif
It don't kick if someone hacks a weapon or even if is given a weapon outside of the ammu's
Reply
#2

I think this:
pawn Код:
else if(GetPlayerInterior(playerid) == 1 && 4 && 6 && 7)
Should be like:
pawn Код:
else if(GetPlayerInterior(playerid) == 1 && GetPlayerInterior(playerid) == 4 &&  GetPlayerInterior(playerid) == 6 && GetPlayerInterior(playerid) == 7)
Also are you sure that you should have && insteed of || ?
Reply
#3

i don't use the || i use &&

EDIT: Failed
Reply
#4

You shouldn't use OnPlayerUpdate. It gets called too much. Mine is on a 3000 timer, and it loops through everyone. You should try that.
Reply
#5

I learned that anyways I think I got it working now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)