19.01.2014, 13:25
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;
}