Anti Cheat keeps banning people :/
#1

pawn Код:
new playerid = i;
        if(PlayerInfo[playerid][power] == 0)
        {
            if(PLAYERLIST_authed[playerid])
            {
                if(!JustLogged[playerid])
                {
                    if(!event)
                    {
                        if(PlayerTemp[playerid][isevent]) return 1;
                        new result = 0;
                        switch(GetPlayerWeapon(playerid))
                        {
                            case 22,28,32,36..40,44,45: result = 1;
                            default: result = 0;
                        }
                        if(result == 0 && GetPlayerWeapon(playerid) == 27 && PlayerInfo[playerid][playerteam] != LSPD && PlayerInfo[playerid][playerteam] != FBI) result = 1;
                        if(result == 0 && GetPlayerWeapon(playerid) == 16 && PlayerInfo[playerid][playerteam] != LSPD) result = 1;
                        if(result)
                        {
                            new wat[ 80 ];
                            myStrcpy(wat, "Cheating [Code #001]");
                            ResetPlayerWeapons(playerid);
                            GameTextForPlayer(playerid, "~r~banned", 60000, 0);
                            format(iStr, sizeof(iStr), "4{ IP-BAN } SERVER has IP banned %s (IP: %s). Reason: %s %s",PlayerName(playerid), PlayerTemp[playerid][IP], wat, TimeDate());
                            iEcho(iStr);
                            BanEx(playerid, wat);
                            return 1;
                        }
                    }
                }
            }
        }
Someone please explain what I am doing wrong here?

Event when someone logs in - they get banned....
Reply
#2



But seriously: result is obviously being set to 1 somewhere. You just need to find out where and why. Add prints everywhere and go fix the thing if the output you get isn't what you would have expected it to be.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)