Raised This Month: $ Target: $400
 0% 

Decimal places...removable?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
n04d
Junior Member
Join Date: Jan 2005
Old 01-05-2005 , 17:00   Decimal places...removable?
Reply With Quote #1

I am currently working on a simple money-mod plugin, and I am using set_hudmessage and show_hudmessage to show how much money the person has. I have successfully setup how to display the money when it is givin to the player, but it is in a decimal and the decimal places values are huge.

What I mean is, in the show_hudmessage, when it draws it's like, "Current amount of money: 5.000000"

I am just trying to get it so it just shows the "5" instead of the ".000000" after it...

Any ideas how I would go about doing this?

Here is how I'm doing the code...

Code:
public display(id){
set_hudmessage(255,255,255,0.015,0.015,0,6.0,999999.0,0.0,0.0,2);
show_hudmessage(id,"Current amount of money: %f",money[id]);
return 1;
}
I am defining money as a float also...

Code:
new Float:money[33] = 0
So that could be a problem....
n04d is offline
 



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

Forum Jump


All times are GMT -4. The time now is 19:17.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode