Posts: 4,878
Threads: 85
Joined: Jun 2007
Reputation:
0
The code looks (almost) okay, it is just a minor mistake. GetPlayerHealth returns the health as Float, but if you compare it to a non-point integer value it does not work as it should.
In short, just make the 0 a float:
if(health != 0.0)
Posts: 104
Threads: 40
Joined: May 2010
Reputation:
0
i change it into if(health != 0.0) but it still kick ??
Posts: 489
Threads: 102
Joined: Apr 2010
Reputation:
0
if you have got
if(health != 0.0)...
then if the players health is NOT equal to 0, they will be kicked...although this is running through all the players in the server so it will mean anyone in the server with above 0 or Less than 0 hp, will be kicked...
When is this getting called?