Posts: 1,197
Threads: 213
Joined: Feb 2011
Reputation:
0
How do you display a string as proper currency format? I found an old include that wasn't supported anymore, and I couldn't find anything else. So what I mean is, if you read from a players file and it's "20000", how do you display it as "20,000" or "20,000.00" (currency format)?
Posts: 485
Threads: 9
Joined: May 2011
Reputation:
0
Theres a few recent includes for this, but you'd use a textdraw to add the decimal
Posts: 797
Threads: 21
Joined: Jan 2007
Reputation:
0
There could be an easier way, but i think you could use a classy way of calculating using modulus (%) and division for the ones, tens and hundreds by doing value % 1000, thousands, ten thousands and hundred thousands by floor rounding the result of value / 1000, and so on. Then just use format for each break, and calculate cents.. not sure how you would like that done but thats how I would do it. Could take a little bit of tweaking initially but yeah.
Posts: 7,801
Threads: 187
Joined: Feb 2010
Reputation:
0
Grim_ released something a couple months ago. It should be beneficial to you.