SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 01/10/2010, 08:49 PM   #1
The_Moddler
High-roller
 
The_Moddler's Avatar
 
Join Date: Jan 2010
Location: In my house.
Posts: 1,130
Reputation: 8
Default How can I do this... ?

So.. how can I do to make this
pawn Code:
format(string, 16, "Motor: %0.f%s", Float[i]/10, "%");

Look like 98.3% instead of 98%

Thanks
The_Moddler is offline  
Old 01/10/2010, 08:55 PM   #2
Jackster
Banned
 
Join Date: Apr 2010
Posts: 221
Reputation: 0
Default Re: How can I do this... ?

98.3 us a bit fussy isent it?
Jackster is offline  
Old 01/10/2010, 09:00 PM   #3
The_Moddler
High-roller
 
The_Moddler's Avatar
 
Join Date: Jan 2010
Location: In my house.
Posts: 1,130
Reputation: 8
Default Re: How can I do this... ?

Quote:
Originally Posted by Jackster View Post
98.3 us a bit fussy isent it?
Don't post if you are not answering me.
The_Moddler is offline  
Old 01/10/2010, 09:02 PM   #4
Calgon
Banned
 
Join Date: Jan 2009
Posts: 6,129
Reputation: 1127
Default Re: How can I do this... ?

Try this:
pawn Code:
format(string, 16, "Motor: %.2f%s", Float[i]/10, "%");
Calgon is offline  
Old 01/10/2010, 09:06 PM   #5
The_Moddler
High-roller
 
The_Moddler's Avatar
 
Join Date: Jan 2010
Location: In my house.
Posts: 1,130
Reputation: 8
Default Re: How can I do this... ?

Quote:
Originally Posted by Calgon View Post
Try this:
pawn Code:
format(string, 16, "Motor: %.2f%s", Float[i]/10, "%");
Yep, thanks mate
The_Moddler is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 10:09 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.