Hud message float
PHP Code:
Code:
You are VIP!Code:
You are VIP!Advices? |
Re: Hud message float
Best advice would be to post in the appropriate amx mod x section.
|
Re: Hud message float
%.1f
|
Re: Hud message float
Sorry, wrong section...
I don't understand Mitchell |
Re: Hud message float
Quote:
|
Re: Hud message float
Does AMX follow all the same format specifiers as SourceMod? It might follow the same as C's printf but I've never bothered looking into AMX too much.
|
Re: Hud message float
Works now, thanks.
But if the value is 1.5 he show me 1.4...other adices please? |
Re: Hud message float
Considering that (apparently) a value of 1.5 was being shown as 1.4999999, perhaps try something like 1.5000001 with %.1f?
|
Re: Hud message float
I can't use a number like this as multiplier...I have to work with this every day.
|
Re: Hud message float
Yes, unfortunately Format truncates it rather than rounds.
There's no good way to round a Float to a specific number of decimal places, other than to multiply the value by 10 times the number of decimal places you want, round it, then divide it by the same number you multiplied it by. In SourceMod, that'd be PHP Code:
Also, why hasn't a mod moved this to the AMXModX board yet? |
| All times are GMT -4. The time now is 18:51. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.