SA-MP Forums Archive
Anti Cheat keeps banning people :/ - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Anti Cheat keeps banning people :/ (/showthread.php?tid=491479)



Anti Cheat keeps banning people :/ - Brandon_More - 30.01.2014

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....



Re: Anti Cheat keeps banning people :/ - Vince - 30.01.2014



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.