Jump to content

Money HUD


-RoCk-Alex

Recommended Posts

function DXdraw() 
--Variables 
        sWidth, sHeight = guiGetScreenSize()  
        moneycount=getPlayerMoney(getLocalPlayer()) 
        money= 'Cash>' ..moneycount 
  
dxDrawText(tostring">tostring (money),sWidth-450,sHeight-500,sWidth-7,sHeight-57,tocolor(255,0,0,220),1.0,"pricedown","right","top",false,false,false) -- Money DX text 
end 
addEventHandler("onClientRender", getRootElement(), DXdraw) 
  
function hudChanger2 () 
    showPlayerHudComponent ( "money", true ) 
end 
addEventHandler( "onClientPlayerJoin", getRootElement(), hudChanger2 ) 

Updated !!

Edited by Guest
Link to comment
  
function DXdraw() 
--Variables 
        sWidth, sHeight = guiGetScreenSize() 
         
        moneycount=getPlayerMoney(getLocalPlayer()) 
        money= 'Cash>' ..moneycount 
  
dxDrawText(tostring">tostring">tostring (money),sWidth-450,sHeight-500,sWidth-7,sHeight-57,tocolor(255,0,0,220),1.0,"pricedown","right","top",false,false,false) -- Money DX text 
  
  
end 
addEventHandler("onClientRender", getRootElement(), DXdraw) 
  
function hudChanger2 () 
    showPlayerHudComponent ( "money", true ) 
    showPlayerHudComponent ( "money", true) 
end 
addEventHandler( "onPlayerJoin", getRootElement(), hudChanger2 ) 
 

Your code wrong.

Link to comment
local nW, nH = guiGetScreenSize( ) 
  
showPlayerHudComponent ( 'money', false ) 
  
addEventHandler( 'onClientRender', root, 
    function( ) 
        dxDrawText(  
            string.format( "$%s", getPlayerMoney( localPlayer )  ), 
            nW - 450, 
            nH - 500, 
            nW - 7, 
            nH - 57, 
            tocolor( 0,255,0,220 ), 
            1.0, 
            'pricedown', 
            'right', 
            'top', 
            false, 
            false, 
            false 
        ) -- Money DX text 
    end 
)    

Link to comment
local nW, nH = guiGetScreenSize( ) 
  
showPlayerHudComponent ( 'money', false ) 
  
addEventHandler( 'onClientRender', root, 
    function( ) 
        dxDrawText(  
            string.format( "$%s", getPlayerMoney( localPlayer )  ), 
            nW - 450, 
            nH - 500, 
            nW - 7, 
            nH - 57, 
            tocolor( 0,255,0,220 ), 
            1.0, 
            'pricedown', 
            'right', 
            'top', 
            false, 
            false, 
            false 
        ) -- Money DX text 
    end 
)    

Dbug :-hud.lua:1: attempt to call global 'guiGetScreenSize' (a nil value)

Link to comment
function DXdraw() 
--Variables 
        sWidth, sHeight = guiGetScreenSize()  
        moneycount=getPlayerMoney(getLocalPlayer()) 
        money= 'Cash>' ..moneycount 
  
dxDrawText(tostring">tostring (money),sWidth-450,sHeight-500,sWidth-7,sHeight-57,tocolor(255,0,0,220),1.0,"pricedown","right","top",false,false,false) -- Money DX text 
end 
addEventHandler("onClientRender", getRootElement(), DXdraw) 
  
function hudChanger2 () 
    showPlayerHudComponent ( "money", true ) 
end 
addEventHandler( "onClientPlayerJoin", getRootElement(), hudChanger2 ) 

Updated !!

Your code too wrong

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...