23.02.2015, 16:25
I'm trying to make anti cheat ,
I'm trying to detect health hack under OnPlayerDamage
Is i am doing right?
Code:
OnPlayerTakeDamage under if(Armour==0) { HH[playerid]++; switch(HH[playerid]) { case 1: { new Float:OldHealth[playerid]; GetPlayerhealth(playerid,OldHealth[playerid]); } case 2: { new Float:newHealth[playerid]; GetPlayerhealth(playerid,newHealth[playerid]); } case 3: { if(OldHealth[playerid]== newHealth[playerid]) { //hacking .. } } } }
Is i am doing right?