PDA

View Full Version : How to show float?


Makaveli93
07/08/2012, 08:10 PM
How can I show only two decimal floats? Ie: 2.56, instead of 2.560000.

FalconX
07/08/2012, 08:13 PM
How can I show only two decimal floats? Ie: 2.56, instead of 2.560000.


new szStr[ 10 ];
format( szStr, sizeof( szStr ), "%.2f", YOUR_FLOAT );
SendClientMessage( playerid, -1, szStr );


Hope this helps :)

Regards,
FalconX

Makaveli93
07/08/2012, 08:30 PM
Thanks, gonna test it :) Rep +'d

FalconX
07/08/2012, 08:31 PM
Thanks, gonna test it :) Rep +'d

No problem mate ! :)