SA-MP Forums Archive
GetPlayerHealth limit? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: GetPlayerHealth limit? (/showthread.php?tid=611390)



GetPlayerHealth limit? - me1m - 05.07.2016

How to bypass limit GetPlayerHealth?
PHP код:
new 
    
Float:hp;
GetPlayerHealth(playeridhp);
printf("HP: %.0f}"hp); 
The player's health and the value of the variable "hp":
Код HTML:
254 -> 254
255 -> 255
256 -> 0
257 -> 1
258 -> 2



Re: GetPlayerHealth limit? - F1N4L - 05.07.2016

Код:
Important Notes:
Even though the health can be set to near infinite values on the server side, the individual clients will only report values up to 255. Anything higher will wrap around; 256 becomes 0, 257 becomes 1, etc.
Health is obtained rounded to integers: set 50.15, but get 50.0



Re: GetPlayerHealth limit? - me1m - 05.07.2016

Quote:
Originally Posted by F1N4L
Посмотреть сообщение
Код:
Important Notes:
Even though the health can be set to near infinite values on the server side, the individual clients will only report values up to 255. Anything higher will wrap around; 256 becomes 0, 257 becomes 1, etc.
Health is obtained rounded to integers: set 50.15, but get 50.0
It is possible to get around?


Re: GetPlayerHealth limit? - Luicy. - 05.07.2016

Create your own health system.