[Tutorial] Easy Anti-Health hack.
#8

I believe Health Hack can be easily detected starting in 0.3z because there is a new callback called OnPlayerWeaponShot, I am not sure if my code will work it is un-tested but I know you can detect Health Hack using OnPlayerWeaponShot

pawn Code:
static stock
    AC_StartHPTick[ MAX_PLAYERS ];

#define MAX_HPWARNING (3)

public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    new
        string[ 90 ], name[ MAX_PLAYER_NAME ], Float:Health, Float:Armour;

    GetPlayerArmour(hitid, Armour), GetPlayerHealth(hitid, Health), GetPlayerName(hitid, name, MAX_PLAYER_NAME);

    if(hittype == BULLET_HIT_TYPE_PLAYER)
    {
        if(Health >= 99.0 && Armour <= 0.0)
        {  
            ++ AC_StartHPTick[ playerid ];
        }
        else if(AC_StartHPTick[ playerid ] >= MAX_HPWARNING)
        {
            format(string, sizeof(string), "[ANTI-CHEAT] - %s[%d] is POSSIBLY using Health-Hacks!", name, playerid);
            SendClientMessageToAll(-1, string);
        }
        else
        {
            AC_StartHPTick[ playerid ] = 0;
        }
    }
    return true;
}
Reply


Messages In This Thread
Easy Anti-Health hack. - by Kyance - 19.01.2014, 12:22
Re: Easy Anti-Health hack. - by JeromeG - 19.01.2014, 12:37
Re: Easy Anti-Health hack. - by Pottus - 19.01.2014, 12:39
Re: Easy Anti-Health hack. - by Omar55555 - 19.01.2014, 12:56
Re: Easy Anti-Health hack. - by Kyance - 19.01.2014, 13:03
Re: Easy Anti-Health hack. - by Lordzy - 19.01.2014, 13:03
Re: Easy Anti-Health hack. - by Kyance - 19.01.2014, 13:08
Re: Easy Anti-Health hack. - by Patrick - 19.01.2014, 13:25
Re: Easy Anti-Health hack. - by Cypress - 19.01.2014, 15:37
Re: Easy Anti-Health hack. - by Hoborific - 23.01.2014, 02:46

Forum Jump:


Users browsing this thread: 3 Guest(s)