SA-MP Forums Archive
Dotted cash? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dotted cash? (/showthread.php?tid=588750)



Dotted cash? - karemmahmed22 - 12.09.2015

Idk if it can be done with stock or w/e, i have no idea to do it
i need to convert some cash like "$300000" to "$3,000,000"
Is there anyway to do it?


Re: Dotted cash? - X337 - 12.09.2015

Use this include : https://sampforum.blast.hk/showthread.php?tid=184328


Re: Dotted cash? - karemmahmed22 - 12.09.2015

Hmmm, so Formatnumber(cash,','); will return the dotted cash? D:
Idk how to use it, theres explaination for floats only -.-"
Hmmm, Nevermind, i know how to use it now, Ty, Repped


Re: Dotted cash? - X337 - 12.09.2015

First, you need to define the thousand separator.
Put this code before including that include.
Код:
#define DEFAULT_THOUSAND_SEP  ','
Example code:
Код:
printf("%s", FormatNumber(300000));