Hello Need small help Pros
#1

Код:
#if defined _ALS_SetPlayerHealth
	#undef SetPlayerHealth
#else
	#define _ALS_SetPlayerHealth
#endif
#define SetPlayerHealth SetPlayerHealthEx

SetPlayerHealthEx(playerid,Float:NewHealth)
{
	PlayerHealth[playerid] = NewHealth;
 	SetPlayerHealth(playerid , NewHealth) ;
	return CheckHack(playerid);
}

CheckHack(playerid)
{
	new Float:Health;
	GetPlayerHealth(playerid, Health);
	if(Health > PlayerHealth[playerid])return KickMessages(playerid, "Health Hack");
	return 1;
}
I am working on this .. is this can detect health hack i dont want to use timer..
Kindly help thanks.
Reply
#2

If you don't want to use timer then probably use it on OnPlayerUpdate example

pawn Код:
public OnPlayerUpdate(playerid)
{
           CheckHack(playerid);
           return 1;
}
Reply
#3

You SHOULD use a timer or add this function in the callback OnPlayerUpdate. Because the script you just made is just a function and so, it won't check anything.
Reply
#4

Thanks I wil try it out.
Reply
#5

Quote:
Originally Posted by MBilal
Посмотреть сообщение
Thanks I wil try it out.
No problem. Anytime
Reply
#6

Код:
	new Float:Health;
	GetPlayerHealth(playerid, Health);
	if(Health > PlayerHealth[playerid])return KickMessages(playerid, "Health Hack");
I put this under global timer checking all player health after 1 sec

the problem is it kicking innocent . . . like when some budy buy health it
some time take Time ReFix PlayerHealth[playerid]

and timer called before it.. so player got kicked...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)