Jump to content

Olá, eu sou iniciante em .lua e tentei fazer esse HUD em dx, só que não aparece no jogo. Já tentei de tudo :c


Recommended Posts

local x,y = guiGetScreenSize()

local px,py = 1280,720

local x,y =  (sx/px), (sy/py) 

 

function hud ()         

dxDrawImage(x*918, y*0, x*362, y*58, ":br_hud/shruk.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)         

dxDrawText("$", x*955, y*19, x*1089, x*68, tocolor(0, 177, 142, 255), 1.30, "default-bold", "left", "top", false, false, false, false, false)    

end     

addEventHandler("onClientRender", root, hud)

Link to comment

Tente isso:
 

local screenW, screenH = guiGetScreenSize()
local x, y = (screenW/1280), (screenH/720)

function hud ()         
    dxDrawImage(x*918, y*0, x*362, y*58, ":br_hud/shruk.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)         
    dxDrawText("$", x*955, y*19, x*1089, y*68, tocolor(0, 177, 142, 255), 1.30, "default-bold", "left", "top", false, false, false, false, false)    
end     
addEventHandler("onClientRender", root, hud)

EDIT 1: Verifique se na pasta br_hud tem o arquivo shruk.png

EDIT 2: Não testei!

Edited by Tommy.
Link to comment
  • 2 weeks later...
On 02/02/2019 at 08:04, Tommy. said:

Tente isso:
 


local screenW, screenH = guiGetScreenSize()
local x, y = (screenW/1280), (screenH/720)

function hud ()         
    dxDrawImage(x*918, y*0, x*362, y*58, ":br_hud/shruk.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)         
    dxDrawText("$", x*955, y*19, x*1089, y*68, tocolor(0, 177, 142, 255), 1.30, "default-bold", "left", "top", false, false, false, false, false)    
end     
addEventHandler("onClientRender", root, hud)

EDIT 1: Verifique se na pasta br_hud tem o arquivo shruk.png

EDIT 2: Não testei!

e verifica se tem no meta tb

 

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