GetPlayerHealth bug?
#1

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?
Reply
#2

Do you have a customized death system, or did you test this on Grand Larceny, or something?
Reply
#3

Yeah, I've just tested it on empty GM, it bugs.
Reply
#4

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.
Reply
#5

I said that it returns "last health" which in my case was 100, (and 1 in yours)
Reply
#6

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.
Reply
#7

Quote:
Originally Posted by kamiliuxliuxliux
Посмотреть сообщение
I said that it returns "last health" which in my case was 100, (and 1 in yours)
so?

it's not a bug, it's supposed to be like this.
you could create your own "health-system"
for server-sided health
Reply
#8

Why would you use GetPlayerHealth when you are dead ? It's too clear that you have 0 Heal Points
Reply
#9

It's anti-cheat bro, anti-cheat...
Reply
#10

Quote:
Originally Posted by kamiliuxliuxliux
Посмотреть сообщение
It's anti-cheat bro, anti-cheat...
You mean anti cheat against HH ? Or what kind ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)