How to show float?
#1

How can I show only two decimal floats? Ie: 2.56, instead of 2.560000.
Reply
#2

Quote:
Originally Posted by Makaveli93
Посмотреть сообщение
How can I show only two decimal floats? Ie: 2.56, instead of 2.560000.
pawn Код:
new szStr[ 10 ];
format( szStr, sizeof( szStr ), "%.2f", YOUR_FLOAT );
SendClientMessage( playerid, -1, szStr );
Hope this helps

Regards,
FalconX
Reply
#3

Thanks, gonna test it Rep +'d
Reply
#4

Quote:
Originally Posted by Makaveli93
Посмотреть сообщение
Thanks, gonna test it Rep +'d
No problem mate !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)