01.11.2017, 19:42
Here you go:
I'd suggest using custom specifiers for this kind of formatting,
refer to this thread for more information: https://sampforum.blast.hk/showthread.php?tid=313488
PHP код:
stock TDConvertPrice(price)
{
new pricestring[50], j = valstr(pricestring, price);
while(j > 0)
{
if(j % 3 == 0 && pricestring[j] != '\0')
strins(pricestring, "~y~,~w~", (strlen(pricestring) - j));
j--;
}
strins(pricestring, "~g~$~w~", 0);
return pricestring;
}
refer to this thread for more information: https://sampforum.blast.hk/showthread.php?tid=313488