2013martin1212 Posted August 23, 2015 Share Posted August 23, 2015 Hello all i make a hud for the money with dx, but the system was doesnt shows the player money, just if i am restart the resource . Please help me my resource is local x,y = guiGetScreenSize() local money = getPlayerMoney ( localPlayer ) local myFont = nil function drawStuff() dxDrawRectangle ( x/1.2, y/5, x/7, y/25, tocolor ( 0, 0, 0, 150 ) ) dxDrawText ( "Game Points:" ..money, x/1.2, y/5, x, y, tocolor (255, 255, 255, 255), 1, "bankgothic" ) end addEventHandler("onClientRender", root, drawStuff) Link to comment
JR10 Posted August 23, 2015 Share Posted August 23, 2015 What exactly is the problem here? The text is not there? Money doesn't update? Please explain better. If there are any errors please post them. Link to comment
Walid Posted August 23, 2015 Share Posted August 23, 2015 the problem is you don't need to use localPlayer with getPlayerMoney. just put it like this local money = getPlayerMoney() Link to comment
TAPL Posted August 23, 2015 Share Posted August 23, 2015 local x, y = guiGetScreenSize() local myFont = nil -- You need this? addEventHandler("onClientRender", root, function() dxDrawRectangle(x/1.2, y/5, x/7, y/25, tocolor(0, 0, 0, 150)) dxDrawText("Game Points:"..getPlayerMoney(), x/1.2, y/5, x, y, tocolor(255, 255, 255, 255), 1, "bankgothic") end) Link to comment
JR10 Posted August 23, 2015 Share Posted August 23, 2015 the problem is you don't need to use localPlayer with getPlayerMoney. This shouldn't be a problem, if the function doesn't accept any parameters, providing it with ones won't matter. 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