Seba500PLK Posted July 2, 2015 Share Posted July 2, 2015 Hi, I have a little problem namely shows me $1, and I would like to showed me $00001. How to do it? local nW, nH = guiGetScreenSize( ) dxDrawText("$"..getPlayerMoney( localPlayer ),nW - 450,nH - 500,nW - 7,nH - 57,tocolor( 0,255,0,220 ),nW/500,'pricedown','right','top', false, false, false) Link to comment
LabiVila Posted July 2, 2015 Share Posted July 2, 2015 You just write this... dxDrawText ("$00000"..getPlayerMoney (local... and if player's money are two numbers like $25 or $26 then you have to get it's length and put some conditions Link to comment
Gr0x Posted July 2, 2015 Share Posted July 2, 2015 dxDrawText(string.format("$%05.0f",getPlayerMoney( localPlayer )),nW - 450,nH - 500,nW - 7,nH - 57,tocolor( 0,255,0,220 ),nW/500,'pricedown','right','top', false, false, false) Link to comment
#RooTs Posted July 2, 2015 Share Posted July 2, 2015 try this local nW, nH = guiGetScreenSize( ) local money = string.format("%08d", getPlayerMoney(getLocalPlayer())) dxDrawText("$"..money,nW - 450,nH - 500,nW - 7,nH - 57,tocolor( 0,255,0,220 ),nW/500,'pricedown','right','top', false, false, false) 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