Please guys i need help :(
#1

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
Reply
#2

http://forum.sa-mp.com/showpost.php?...postcount=1078

Could just change , to .
Reply
#3

PHP код:
FormatNumber(number)
{
    new 
numOfPeriods 0tmp number;
    new 
str[32];
    while(
tmp 1000) {
        
tmp floatround(tmp 1000floatround_floor), ++numOfPeriods;
    }
    
valstr(strnumber);
    new 
slen strlen(str);
    for(new 
1!= numOfPeriods 1; ++i) {
        
strins(str"."slen 3*i);
    }
    return 
str;

This converts your number into a string, so use %s not %d
Reply
#4

Quote:
Originally Posted by kovac
Посмотреть сообщение
PHP код:
FormatNumber(number)
{
    new 
numOfPeriods 0tmp number;
    new 
str[32];
    while(
tmp 1000) {
        
tmp floatround(tmp 1000floatround_floor), ++numOfPeriods;
    }
    
valstr(strnumber);
    new 
slen strlen(str);
    for(new 
1!= numOfPeriods 1; ++i) {
        
strins(str"."slen 3*i);
    }
    return 
str;

This converts your number into a string, so use %s not %d
Quote:
Originally Posted by ISmokezU
Посмотреть сообщение
Thanks guys <3 +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)