can someone add comma's here for me?
#3

Quote:
Originally Posted by SetPlayerNameTag
Посмотреть сообщение
Try create a stock, and using switch to format it if the money is over 1m

for ex: format(string, sizeof(string), "%s", bizValue(bid));

credits goes to Mariciuc223
Код HTML:
stock FormatMoney(Number)
{
	new str[16];
	format(str, 16, "$%i", Number);
	new l = strlen(str);

	if(Number < 0)
	{
	  	if (l > 5) strins(str, ".", l-3);
		if (l > 8) strins(str, ".", l-6);
		if (l > 11) strins(str, ".", l-9);
	}
	else
	{
		if (l > 4) strins(str, ".", l-3);
		if (l > 7) strins(str, ".", l-6);
		if (l > 10) strins(str, ".", l-9);
	}

	return str;
}
nno no i need unlimited money because i can set biz price to any price i want 999,9999,999 sometimes... so nobody can buy it
Reply


Messages In This Thread
COMMAS in BUSINESS PRICE +REP - by BadJih - 08.09.2017, 15:22
Re: can someone add comma's here for me? - by SetPlayerNameTag - 08.09.2017, 15:25
Re: can someone add comma's here for me? - by BadJih - 08.09.2017, 15:37
Re: can someone add comma's here for me? - by SetPlayerNameTag - 08.09.2017, 15:39
Re: can someone add comma's here for me? - by thegamer355 - 08.09.2017, 15:41
Re: can someone add comma's here for me? - by BadJih - 08.09.2017, 15:45
Re: can someone add comma's here for me? - by BadJih - 08.09.2017, 16:08
Re: can someone add comma's here for me? - by Vince - 08.09.2017, 16:49

Forum Jump:


Users browsing this thread: 1 Guest(s)