Weapon anti-cheat
#1

Hello, so I was writing an anti weapon cheat...


pawn Код:
new weaponid = GetPlayerWeapon(playerid);
        if(weaponid != 0)
        {
            new bool:found = false;
            for(new i; i < sizeof(RealPlayerWeapons[]); i++)
            {
                if(weaponid == RealPlayerWeapons[playerid][i][0])
                {
                    found = true;
                    RealPlayerWeapons[playerid][i][1] = GetPlayerAmmo(playerid);
                }
            }
            if(!found) RemovePlayerWeapon(playerid,weaponid);
        }
This is pretty much it.. I hooked the GivePlayerWeapon function for it to add the weapon to "RealPlayerWeapons" array.

It all seems to work fine with miniguns and stuff. But once I cheat myself a weapon like "Nightstick" or a dildo of some sort, it just doesn't remove it.
After I cheated it, I looked trought the array and it wasn't there. So why doesn't it remove it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)