05.01.2012, 16:47
Hi, i have 1 problem with my Anti Health Hack, i created This:
OnPlayerSpawn:
CheckHack:
(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...
Код:
stock J_SetPlayerHealth(playerid,Float: health) { SetPlayerHealth(playerid,health); new Float:vita; GetPlayerHealth(playerid,vita); antihealth[playerid] = vita; return 1; }
Код:
SetTimerEx("CheckHack",1000,1,"d",playerid);
Код:
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 tried also SetPVarFloat and kick me also if i no use Hack.
Sorry for my Bad English...