19.01.2017, 04:35
Okay, when I deleted the "formatnumber" it did work and now showing correct but I would like to use my formatnumber stock too it puts "," to numbers like "$40,000"
Anything I could do to fix this?
here is my format number stock
Anything I could do to fix this?
here is my format number stock
Code:
stock FormatNumber(Float:amount) { new str[16]; format(str, sizeof(str), "%d", floatround(amount)); new l = strlen(str); if (amount < 0) // - { if (l > 4) strins(str, ",", l-3); if (l > 7) strins(str, ",", l-6); if (l > 10) strins(str, ",", l-9); } else { if (l > 3) strins(str, ",", l-3); if (l > 6) strins(str, ",", l-6); if (l > 9) strins(str, ",", l-9); } return str; }