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



commas - BadJih - 22.06.2018

Hello there,

I want to add comma's to the biz price (ex: $1000000 > $1,000,000)
please someone set it to the code, i tried almost all stuff myself but i failed in it...

This is its code

PHP код:
        if(BizInfo[business][bOwned] == 0)
        {
            new 
pricestring[32];
            new 
price BizInfo[business][bValue];
            new 
valstr(pricestring,price);
            while(
>= 4) { -= 3strins(pricestring,",",j); }
            
strins(pricestring,"$",0);
            
format(stringsizeof(string), "%s\nStatus: For Sale\nPrice: %s",BizInfo[business][bName],pricestring); 



Re: commas - Verc - 22.06.2018

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