SA-MP Forums Archive
How do I add comma ? - 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: How do I add comma ? (/showthread.php?tid=633049)



How do I add comma ? - Lester23 - 24.04.2017

Hi I'm struggling to add comma whenever I catch a fish to show (You caught a Fish worth 2,500$ instead of You caught a Fish worth 2500$)

Код:
				money = 10000 + random(15000);
				PlayerInfo[playerid][pFishPrice] = money;
			    SendClientMessage(playerid, COLOR_DARKPINK, "You caught a normal fish!");
			    format(string,sizeof(string),"Your fish is worth $%d!", money);
			    SendClientMessage(playerid, COLOR_DARKPINK, string);
			    SendClientMessage(playerid, COLOR_WHITE, "To sell the fish go to a  24/7.");
		     	format(string,sizeof(string),"* %s caught a common fish that can be sold for about $%d.", sendername, money);
        		ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
				PlayerInfo[playerid][pFishes] = 1;
Any ideas please ?


Re: How do I add comma ? - GoldenLion - 24.04.2017

https://sampwiki.blast.hk/wiki/AddCommas