05.02.2012, 21:38
pawn Код:
stock number_format(amount)
{
new
money[16],
negativ = 0;
if(amount < 0) negativ = 1;
format(money, sizeof(money), "%i", amount);
new
lenght = strlen(money);
while((lenght -= 3) > negativ) strins(money, ".", lenght);
return money;
}
// This would print 1.500
main()
{
prinft("%s", number_format(1500));
}