2013martin1212 Posted August 23, 2015 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)
JR10 Posted August 23, 2015 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. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
Walid Posted August 23, 2015 Posted August 23, 2015 the problem is you don't need to use localPlayer with getPlayerMoney. just put it like this local money = getPlayerMoney() Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
TAPL Posted August 23, 2015 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)
JR10 Posted August 23, 2015 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. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
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