23.12.2018, 08:37
pawn Код:
IntegerWithDelimiter(integer, delimiter[] = ",") {
new string[16];
format(string, sizeof string, "%i", integer);
for (new i = strlen(string) - 3, j = ((integer < 0) ? 1 : 0); i > j; i -= 3) {
strins(string, delimiter, i, sizeof string);
}
return string;
}
pawn Код:
format(string, sizeof ( string ), "$ %s", IntegerWithDelimiter (1000000 )) ;