How can formatnumber? - 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: How can formatnumber? (
/showthread.php?tid=662073)
How can formatnumber? -
rockys - 23.12.2018
how to format a number
like this 2000 = 2,000
Re: How can formatnumber? -
SyS - 23.12.2018
https://sampforum.blast.hk/showthread.php?tid=184328
Re: How can formatnumber? -
rockys - 23.12.2018
Quote:
Originally Posted by SyS
|
invalid download link
Re: How can formatnumber? -
Dignity - 23.12.2018
pawn Код:
IntegerWithDelimiter(integer, delimiter[] = ",") {
new string[16];
format(string, sizeof string, "%i", integer);
for (new i = strlen(string) - 3, j = ((integer < 0) ? 1 : 0); i > j; i -= 3) {
strins(string, delimiter, i, sizeof string);
}
return string;
}
Usage:
pawn Код:
format(string, sizeof ( string ), "$ %s", IntegerWithDelimiter (1000000 )) ;
Re: How can formatnumber? -
DAKYSKYE - 23.12.2018
Use pawn-humanize.
https://sampforum.blast.hk/showthread.php?tid=657062
Re: How can formatnumber? -
TheToretto - 23.12.2018