SA-MP Forums Archive
Display health value without decimals - 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)
+--- Thread: Display health value without decimals (/showthread.php?tid=283273)



Display health value without decimals - Superthijs - 14.09.2011

I've made a code that views the player's health in numbers, but it says 100.000000.
How to show it as 100 (without the decimals)?


Re: Display health value without decimals - [HiC]TheKiller - 14.09.2011

https://sampwiki.blast.hk/wiki/Floatround


Re: Display health value without decimals - Lorenc_ - 14.09.2011

%0.0f - 0 decimal places
%0.1f - 1 decimal places
%0.2f - 2 decimal places
%0.3f - 3 decimal places

etc constantly repeated...


Re: Display health value without decimals - Superthijs - 14.09.2011

Thanks, Lorenc_.