Jump to content

Help


Recommended Posts

Posted

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) 
  
  

560x95_FFFFFF_FF9900_000000_000000.png

Posted

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

Posted
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) 

CiTLh.png

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