SA-MP Forums Archive
SetPlayerHealth, integer, wtf!? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SetPlayerHealth, integer, wtf!? (/showthread.php?tid=103311)



SetPlayerHealth, integer, wtf!? - djuro_zero - 19.10.2009

Why in last release of samp-server(0.3a) SetPlayerHealth(playerid, health)), value of health must be in integer? I dont understand that, but GetPlayerHealth(playerid, health), health must be float!
This is stupid, now i must use floatround to get integer from float... Why isnt healt in boath functions float or integer?


Re: SetPlayerHealth, integer, wtf!? - SoeH - 19.10.2009

It's EVER this, it's stupid, but is this....


Re: SetPlayerHealth, integer, wtf!? - Sergei - 19.10.2009

It should be that SetPlayerHealth would automaticly convert float to integer.


Re: SetPlayerHealth, integer, wtf!? - SoeH - 19.10.2009

Quote:
Originally Posted by $ЂЯĢ
It should be that SetPlayerHealth would automaticly convert float to integer.
Evident...


Re: SetPlayerHealth, integer, wtf!? - Correlli - 19.10.2009

Quote:
Originally Posted by $ЂЯĢ
It should be that SetPlayerHealth would automaticly convert float to integer.
You can do that by yourself, too. (with editing one function)


Re: SetPlayerHealth, integer, wtf!? - Sergei - 19.10.2009

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by $ЂЯĢ
It should be that SetPlayerHealth would automaticly convert float to integer.
You can do that by yourself, too.
Yep, but it would be logical that it is done automaticly since GetPlayerHealth and SetPlayerHealth aren't compatibile values anymore.


Re: SetPlayerHealth, integer, wtf!? - MenaceX^ - 19.10.2009

I think it's fine as it is now, it doesn't that matter for me. Nor for other people. Besides, you can make it on your own as float.


Re: SetPlayerHealth, integer, wtf!? - Joe Staff - 19.10.2009

Kind of silly that it's a float since GTA:SA rounds it down anyway.