Posts: 244
Threads: 55
Joined: Nov 2013
Reputation:
0
When you die and you're between death and spawn (player's laying on the ground dead and camera is swinging above player), I used GetPlayerHealth and function supposed to return 0. But no. It returned my last health points before death. Let's say I have 100 HP and use /kill which set health to 0. When I use that function between death and spawn, it returns me 100 HP. Is that bug or smth? And is there any ways to fix that?
Posts: 3,133
Threads: 71
Joined: Dec 2013
Reputation:
0
Do you have a customized death system, or did you test this on Grand Larceny, or something?
Posts: 244
Threads: 55
Joined: Nov 2013
Reputation:
0
Yeah, I've just tested it on empty GM, it bugs.
Posts: 524
Threads: 10
Joined: Feb 2012
Reputation:
0
i just tested this with OnPlayerUpdate.
set my health to 1.0 and jumped off some building.
it always returned my "last health" which was 1.0.
so no, it's not set to 100. it's set to 100 once you respawn.
& there's no bug.
Posts: 244
Threads: 55
Joined: Nov 2013
Reputation:
0
I said that it returns "last health" which in my case was 100, (and 1 in yours)
Posts: 3,133
Threads: 71
Joined: Dec 2013
Reputation:
0
I haven't myself tested it, how-ever I believe a solution could be detecting the death animation an some other small checks, and then if the checks are positive return the proper value of 0 on GetPlayerHealth. Not sure, if it's worth it, though, since it takes 5-10 seconds before the player respawns after dying.
Posts: 1,241
Threads: 67
Joined: Dec 2013
Why would you use GetPlayerHealth when you are dead ? It's too clear that you have 0 Heal Points
Posts: 1,241
Threads: 67
Joined: Dec 2013
Quote:
Originally Posted by kamiliuxliuxliux
It's anti-cheat bro, anti-cheat...
|
You mean anti cheat against HH ? Or what kind ?