flot : text - 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: flot : text (
/showthread.php?tid=310088)
flot : text -
spd_sahil - 10.01.2012
pawn Код:
GetPlayerHealth(killerid,killhealth);
GetPlayerArmour(killerid,killarmor);
new out[256];
format(out,256,"%s Slaughtered %s | Health - %f , Armor - %f",killername,playername,killhealth,killarmor);
TextDrawSetString(TextdrawB,out);
okay so the output i get is
A slaugtered B | Health = 100.0000000 Armour = 50.00000000000
how do i get rid of the 0000000 only 2 0 is enough
Re: flot : text -
Jochemd - 10.01.2012
Use %.1f to show only part of the float.
Код:
%.1f -> 100.0
%.2f -> 100.00
%.3f -> 100.000
I think that explains enough.
Re: flot : text -
spd_sahil - 10.01.2012
Oh yes
I was not aware of this
thanks a lot
Re: flot : text -
Jochemd - 10.01.2012
Quote:
Originally Posted by spd_sahil
Oh yes I was not aware of this thanks a lot
|
You are welcome!