Msypon Posted August 7, 2012 Share Posted August 7, 2012 How to add comma in money value? Link to comment
Tete omar Posted August 7, 2012 Share Posted August 7, 2012 You mean the player money upper of health ? like the green money on this picture you can't use commas though. Link to comment
Callum Posted August 7, 2012 Share Posted August 7, 2012 function convertMoneyToString(money) local formatted = money while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') if k==0 then break end end formatted = "$"..tostring(formatted) return formatted end Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now