SA-MP Forums Archive
Health hack detector - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Health hack detector (/showthread.php?tid=615908)



Health hack detector - TrueThing - 29.08.2016

hi i created a health hack detector it checks players health every 2 seconds if its above 98 and below 101 the player is using if its not then the player is clean here is my 2 sec timer:

Код:
	if(health > 98 && health < 101 || armour > 98)
	{
	    Kick(playerid);
	    print("Player HH");
	}
and this is my player on spawn

Код:
	    SetPlayerHealth(playerid, 98);
            SetPlayerArmour(playerid, 98);
the problem is when player enable godmode and set hes health to 99999 and then the player types /kill to disable godmode which is

Код:
CMD:kill(playerid, params[])
{
    SetPlayerHealth(playerid, 0);
    return 1;
}
script calls

Код:
	if(health > 98 && health < 101 || armour > 98)
	{
	    Kick(playerid);
	    print("Player HH");
	}



Re: Health hack detector - MaazS - 29.08.2016

so if my health is 101 and i get punched im health hacking?


Re: Health hack detector - TrueThing - 29.08.2016

Quote:
Originally Posted by MaazS
Посмотреть сообщение
so if my health is 101 and i get punched im health hacking?
no because your health will never be lower than 99989 and higher than 98


Re: Health hack detector - saffierr - 29.08.2016

Call me what you want, but I don't understand a word of your question/problem?


Re: Health hack detector - Logic_ - 29.08.2016

Your code isn't even a Health hack detector... Set a player's health to infinity, create a variable that saves player's health, use a textdraw to display the health, use a custom damage system that you uses your variable thingy and then kill a player if their health is lower than 1.