27.08.2010, 14:14
pawn Код:
stock NiceMoney(amount)
{
new money[16],negativ = 0, sep[2], tmp; sep= ".";
if(amount < 0) negativ = 1;
format(money, sizeof(money), "%d", amount);
for(new i=strlen(money); i>negativ+1; i--)
{
tmp++;
if(tmp==3) { strins(money, sep, i-1); tmp=0; }
}
return money;
}
pawn Код:
printf("%s", NiceMoney(1234567890));
![Cheesy](images/smilies/biggrin.png)