So, I’m unsure on how to display someone’s points with commas so it’s easy to understand how many digits there are if that kinda makes sense.
So, instead of 9289482395, I would love to see 9,289,482,395.
The current function which displays their points on the scoreboard is
function( ply ) return ply.PS2_Wallet.points end,
What function would I add that would separate the numbers shown by ply.PS2_Wallet.points?
I know that utime has this function which prevents it from being displayed in seconds is:
function timToStr( time ) local tmp = time local s = tmp % 60 tmp = math.floor( tmp / 60 ) local m = tmp % 60 tmp = math.floor( tmp / 60 ) local h = tmp % 24 tmp = math.floor( tmp / 24 ) local d = tmp % 7 local w = math.floor( tmp / 7 ) return string.format( "%02iw %id %02ih %02im %02is", w, d, h, m, s ) end
but I can’t figure out how I could possibly convert or reflect from to the display of points.
Thanks for any help.
[editline]12th October 2017[/editline]
Well, I found this http://lua-users.org/wiki/FormattingNumbers but I’m still confused on which suits my case.