[Help] Health Anticheat Problem
#1

I am trying to script a type of health anti-cheat but it just won't work properly...

Код:
//The function below is called every 250ms
public HealthCheck()
{
	for(new i=0; i<MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i) && GetPlayerState(i) != PLAYER_STATE_SPECTATING && GetPlayerState(i) != PLAYER_STATE_WASTED)
		{
            new Float:health;
  			GetPlayerHealth(i, health);
  			if(health >= 100.0)
  			{
  			   SetPlayerHealth(i, 75.0);
  			   GetPlayerHealth(i, health);
  			   if(health > 75.0)
  			   {
  			   	SendClientMessage(i, COLOR_RED, "-> Cheater");
  			   }
  			   else
  			   {
  				SendClientMessage(i, COLOR_RED, "-> Clean");
   				SetPlayerHealth(i, 100.0);
  			   }
  		}
    }
}
As soon as i enter the server i keep getting "-> Cheater" message.
Normaly i shouldn't get it since i don't hack but i keep getting it.
The code looks like it should work but it just doesn't.

Anyone can figure out the problem?
Reply


Messages In This Thread
[Help] Health Anticheat Problem - by viKKmaN - 16.03.2010, 21:29
Re: [Help] Health Anticheat Problem - by [03]Garsino - 16.03.2010, 21:30
Re: [Help] Health Anticheat Problem - by viKKmaN - 16.03.2010, 21:34
Re: [Help] Health Anticheat Problem - by viKKmaN - 16.03.2010, 22:25
Re: [Help] Health Anticheat Problem - by [03]Garsino - 17.03.2010, 06:37
Re: [Help] Health Anticheat Problem - by Chris. - 17.03.2010, 08:11
Re: [Help] Health Anticheat Problem - by cessil - 17.03.2010, 09:08
Re: [Help] Health Anticheat Problem - by XGh0stz - 17.03.2010, 10:49

Forum Jump:


Users browsing this thread: 5 Guest(s)