SA-MP Forums Archive
string - 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: string (/showthread.php?tid=451516)



string - Captain_jeffree95 - 17.07.2013

how do u get commers to show in client messages .

e.g

Now
$16000

how we want it
$16,000

how do we get the money in the client messages to show up like this.


Re: string - Misiur - 17.07.2013

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


Re: string - Income - 17.07.2013

PHP код:
stock FormatNumber(value//RyDeR`
{
    new
        
string[24]
    ;
    
format(stringsizeof(string), "%d"value);
    
    for(new 
= (strlen(string) - 3); > (value 0) ; -= 3)
    {
        
strins(string[i], ","0);
    }
    return 
string;

Example:

PHP код:
new string[124];
format(stringsizeof(string),"$%s"FormatNumber(16000));
SendClientMessage(playeridCOLOR_GREYstring);