Help with a percentage
#1

I want to build a hud on the screen that will show the car health in percentage for example if I have 950 health , its will show me 95%, its don't working to me because its saying the health and alot of number after the dot, like 95.234235263%.
How can I fix it ? Thanks!

Sorry for my bad English.
Reply
#2

Use floatround https://sampwiki.blast.hk/wiki/Floatround
format(string,sizeof(string),"%d%%",floatround(Car Health, floatround_ceil));
Reply
#3

Quote:
Originally Posted by Jefff
Посмотреть сообщение
Use floatround https://sampwiki.blast.hk/wiki/Floatround
format(string,sizeof(string),"%d%%",floatround(Car Health, floatround_ceil));
Thanks!
Reply
#4

Did that work for you? I'm having the same problem.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)