GetPlayerHealth Bug???
#1

Hey I got this in a timer:
Код:
   				GetPlayerHealth(i,pHealth[i]); //Example 100
   				       new Float:plushealth = pHealth[i]; // << 100 health
					SetPlayerHealth(i,plushealth-1); // the player health get 99
					GetPlayerHealth(i,aHealth[i]); // this get 99
					if(aHealth[i] == pHealth[i]) // HOW THE FUCK can pHealth be 99
					{
						SendClientMessage(i, Green, "Hacking health!");
						printf("%f,%f",pHealth[i],aHealth[i]);
					}
					SetPlayerHealth(i,pHealth[i]);
Why the fuck I get 99.000000,99.000000 in my server console?
Reply
#2

Basicly, you did it right, but here.


Код:
   				GetPlayerHealth(i,pHealth[i]); //Example 100
   				       new Float:plushealth = pHealth[i]; // << 100 health
					SetPlayerHealth(i,plushealth-1); // the player health get 99
					GetPlayerHealth(i,aHealth[i]); // this get 99
					if(aHealth[i] == pHealth[i]) // HOW THE FUCK can pHealth be 99
					{
						SendClientMessage(i, Green, "Hacking health!");
						printf("%0.f,%0.f",pHealth[i],aHealth[i]);
					}
					SetPlayerHealth(i,pHealth[i]);
Reply
#3

well thanks but thats not the point.
The point is that it detects me for hacking.
And I'm not hacking. SO I don't understand how the health still can be the same.
Reply
#4

you set user health to 99 and you get then the player 99 so that means the user always hack you may have to Get before seting it?
Reply
#5

floatround.
For float to int.
Reply
#6

Quote:
Originally Posted by whitedragon
you set user health to 99 and you get then the player 99 so that means the user always hack you may have to Get before seting it?
You don't understand it I gues.
First I get the player health with pHealth. Then I remove 1 health. Then I get the health with the aHealth. So if the player hacked his had has turned back to 100.
If Ahealth (Should be 99) is the same as pHealth. Then it detects the player as hacks.
Reply
#7

have you solved that? I will make omething like that to my server but i have no idea where to start
Reply
#8

Modern cheat tolls don't set your health to 100 all the time, they just freeze it, so this method is completly useless.
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)