Jump to content

[HELP] Money Format


Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...