Posts: 32
Threads: 3
Joined: Jun 2017
Reputation:
0
hey guys i make cmd but i don't know how to make it good like this
i do that : Your balance is $700000000
but i want like this : Your balance is $700.000.000
Posts: 180
Threads: 3
Joined: Mar 2018
PHP код:
FormatNumber(number)
{
new numOfPeriods = 0, tmp = number;
new str[32];
while(tmp > 1000) {
tmp = floatround(tmp / 1000, floatround_floor), ++numOfPeriods;
}
valstr(str, number);
new slen = strlen(str);
for(new i = 1; i != numOfPeriods + 1; ++i) {
strins(str, ".", slen - 3*i);
}
return str;
}
This converts your number into a string, so use %s not %d