Simple anti infinite ammo
#1

Hey.

What I'm trying to do is simple detection for infinite ammo, when I tested it with another person it worked fine.
When it's on server, it detect the infinite ammo but often detects a player without hacks also, so the code I tried is the following:

pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    OldAmmo[playerid] = GetPlayerAmmo(playerid);
    SetTimerEx("CheckUnlimitedAmmo", 500, false, "i", playerid);
    return 1;
}

public CheckUnlimitedAmmo(playerid)
{
    new msg[128];
    NewAmmo[playerid] = GetPlayerAmmo(playerid);
    if (OldAmmo[playerid] == NewAmmo[playerid]){
        format(msg,sizeof(msg),"[AC] Possible infinite ammo hack on %s",GetPlayerNameEx(playerid, ENameType_CharName));
        ABroadcast(X11_YELLOW, msg, EAdminFlags_All);
    }
    return true;
Where is the problem that script detects a player without hacks also ? :/
Reply


Messages In This Thread
Simple anti infinite ammo - by Lajko1 - 22.06.2016, 12:58
Re: Simple anti infinite ammo - by SyS - 22.06.2016, 13:02
Re: Simple anti infinite ammo - by Stinged - 22.06.2016, 14:01

Forum Jump:


Users browsing this thread: 1 Guest(s)