[Help]Anti Health Hack -
darkdrago - 05.01.2012
Hi, i have 1 problem with my Anti Health Hack, i created This:
Код:
stock J_SetPlayerHealth(playerid,Float: health)
{
SetPlayerHealth(playerid,health);
new Float:vita;
GetPlayerHealth(playerid,vita);
antihealth[playerid] = vita;
return 1;
}
OnPlayerSpawn:
Код:
SetTimerEx("CheckHack",1000,1,"d",playerid);
CheckHack:
Код:
public CheckHack(playerid)
{
new Float:vita;
GetPlayerHealth(playerid,vita);
if(antihealth[playerid] > vita || antihealth[playerid] < vita)
{
new stringa[256];
format(stringa,sizeof(stringa),"AntiCheat: %s has been kicked, reason: Health Hack",GetPlayerNameEx(playerid));
SendClientMessageToAll(0xFF0000EC,stringa);
Kick(playerid);
}
return 1;
}
(I created variable "new Float:antihealth[MAX_PLAYERS]")
i tried also SetPVarFloat and kick me also if i no use Hack.
Sorry for my Bad English...
Re: [Help]Anti Health Hack -
fiki574 - 05.01.2012
Try this ->
https://sampforum.blast.hk/showthread.php?tid=303695 <- its efficient if you want to use it with command!
Re: [Help]Anti Health Hack -
darkdrago - 05.01.2012
Thanks for the advice but I need a timer that starts automatically, try to change a little bit filterscript that, I will answer as soon as possible, thank you

Ps. I will maintain your rights
Re: [Help]Anti Health Hack -
darkdrago - 05.01.2012
This is no Anti Health Hack, this is Check, i need a Anti Health Hack, not Check Health Hack
Re: [Help]Anti Health Hack -
Unknownich - 05.01.2012
Try this simple code
under GameModeInit put this timer SetTimer("healthcheck", 3000, true);
forward healthcheck();
pawn Код:
public healthcheck()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
new Float:phealth;
GetPlayerHealth(i, phealth);
if(phealth >=101)
{
new pname[200];
new string[200];
GetPlayerName(i, pname, sizeof(pname));
format(string, sizeof(string), "SERVER: %s id (%d) has been banned! Reason: Health hack", pname,i);
SendClientMessageToAll(0xffffffff,string);
BanEx(i,string);
}
}
return 1;
}
Re: [Help]Anti Health Hack -
darkdrago - 05.01.2012
This is an Anti-God Mode, there's just something to make that automatically kick a player for Health Hack?
Re: [Help]Anti Health Hack -
Unknownich - 05.01.2012
Then try with OnPlayerTakeDamage, you must check if player has health hack there is no other way.
Re: [Help]Anti Health Hack -
darkdrago - 06.01.2012
The problem is that I have no idea how to do of OnPlayerTakeDamage...
Re: [Help]Anti Health Hack -
TheLonelyMoo - 06.01.2012
try to check the wiki for the example onplayertakedamage. cessil has best antihealth hack he made one around the scripting discussion i think try to search it
Re: [Help]Anti Health Hack -
darkdrago - 06.01.2012
I honestly know how the public, my problem is the script, I do not know where to start