• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Function] Number Separator

Critico

Sexy
Joined
Mar 25, 2010
Messages
370
Reaction score
176
This function return return huge numbers with points

Code:
function getMilharNumber(n)
   return tostring(math.floor(n)):reverse():gsub("(%d%d%d)","%1."):gsub(",(%-?)$","%1"):reverse()
end


exemple:

Code:
function getMilharNumber(n) -- critico/vodkart
   return tostring(math.floor(n)):reverse():gsub("(%d%d%d)","%1."):gsub(",(%-?)$","%1"):reverse()
end
print(getMilharNumber(1000000)) -- return 1.000.000
 
@Critico
Wow, this is really usefull in case of showing a big number in a talkaction or something.

35509 much better and clean than 2000000.
 
Back
Top