15.07.2015, 10:47
pawn Код:
stock NiceNumber(iNum, const szChar[] = ",")
{
new
szStr[16]
;
format(szStr, sizeof(szStr), "%d", iNum);
for(new iLen = strlen(szStr) - 3; iLen > 0; iLen -= 3)
{
strins(szStr, szChar, iLen);
}
return szStr;
}
pawn Код:
NiceNumber(12345)
Will output: 12,345 for example
pawn Код:
format(str,sizeof(str),"This is how much it is: %s",NiceNumber(12345));
str will output: This is how much it is: 12,345