Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Commas not working

$
0
0
PHP Code:

stock Comma(numbers)
{
    new 
temp[24],counter = -1;
    
valstr(temp,numbers);
    for(new 
strlen(temp);0i--)
    {
        
counter++;
        if(
counter == 3)
        {
            
strins(temp,",",i);
            
counter 0;
        }
    }
    return 
temp;


PHP Code:

    format(strsizeof(str), "{007200}»{FFFFFF} Money:[$%d] | Bank:[$%d] | Paycheck:[$%d] | Savings:[$%d]",Comma(Character[playerid][Cash]), Comma(Character[playerid][Bank]), Comma(Character[playerid][Payday]), Comma(Character[playerid][Savings])); 

Results in:
PHP Code:

 Money:[$49] | Bank:[$49] | Paycheck:[$50] | Savings:[$49


Viewing all articles
Browse latest Browse all 18226

Trending Articles