GetPlayerHealth Problem lol
#1

I think GetPlayerHealth have a Bug, when i save it in any Variable,
but i set it before it Returns 2-3 Times the Same Value so i set the Health to 900.0
it return again 1000.0 , 3x Times and it return the right Value

how said i think it is an Sa-mp Bug but i'm not rly Sure
Reply
#2

GetPlayerHealth only gives values between 0.0 and 255.0
If you set for example a players health to 1024 (256*4) it will give 0.0, if you set it to 1023 ((256*4)-1), it will return 255.0

(256.0*x)-1.0 will always give 255.0 when x is a whole number...
Reply
#3

But Maximal Player Health is 1000.0
Reply
#4

I thought clientside it was higher... if I use /god on my server and it takes ages to kill me with minigun when my health was set to 99999.
Reply
#5

Quote:
Originally Posted by BlackFoX_UD_
But Maximal Player Health is 1000.0
That's for vehicle.

http://forum.sa-mp.com/index.php?top...4476#msg924476
Reply
#6

But when i set 1000.0 for Player Health it was exactly 100% of Health Bar , the same result 100.0 = 10%
But ok now know why GetPlayerHealth wont return the right Value

Thank you Guys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)