Jump to content

Ajuda +1, desculpa o incomodo


Recommended Posts

local screenW, screenH = guiGetScreenSize()
local x, y = (screenW/1360), (screenH/768)

local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted" }

addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),
function ()
	for _, component in ipairs( components ) do
		setPlayerHudComponentVisible( component, false )
	end
end)

addEventHandler("onClientRender", root,
    function()
        local money = convertNumber(getPlayerMoney(getLocalPlayer()))
        local bank = convertNumber(getElementData(localPlayer, "Bank:Caixa") or "0")   
        local desemp = getElementData (localPlayer, "Profissão" ) or false
        local wanted = getPlayerWantedLevel(getLocalPlayer())
        local procurado = getPlayerWantedLevel(getLocalPlayer())
        local Nivel = getElementData ( localPlayer, "Level" ) or 0
        local playerName = getPlayerName ( getLocalPlayer() )
        local fome = getElementData(getLocalPlayer(), "hunger")
	local sede = getElementData(getLocalPlayer(), "sede")
	local sono = getElementData(getLocalPlayer(), "sono")

        dxDrawRectangle(1386, 84, 149, 11,  tocolor(0, 0, 0, 255), 1)), false)
        
        dxDrawRectangle(864, 58, 150, 31, tocolor(0, 0, 0, 172), false)
        
        dxDrawRectangle(864, 93, 150, 31, tocolor(0, 0, 0, 172), false)
        
        dxDrawRectangle(864, 128, 150, 31, tocolor(0, 0, 0, 172), false)
        
        dxDrawRectangle(864, 164, 150, 31, tocolor(0, 0, 0, 172), false)
        
        dxDrawRectangle(863, 23, 0, 0, tocolor(255, 255, 255, 255), false)
        
        dxDrawRectangle(838, 23, 35, 31, tocolor(0, 190, 183, 255), false)
        
        dxDrawRectangle(838, 58, 35, 31, tocolor(0, 190, 183, 255), false)
        
        dxDrawRectangle(838, 93, 35, 31, tocolor(0, 190, 183, 255), false)
        
        dxDrawRectangle(838, 128, 35, 31, tocolor(0, 190, 183, 255), false)
        
        dxDrawRectangle(838, 164, 35, 31, tocolor(0, 190, 183, 255), false)
        
        dxDrawImage(844, 31, 24, 17, ":HUDBVE/Pedro/Cifraosz.png", 0, 0, 0, tocolor(0, 0, 0, 199), false)
        
        dxDrawImage(844, 66, 24, 17, ":HUDBVE/Pedro/caixa.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
        
        dxDrawImage(844, 174, 24, 15, ":HUDBVE/Pedro/EstrelaIcone.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
        
        dxDrawImage(843, 102, 25, 16, ":HUDBVE/Pedro/maleta.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
        
        dxDrawImage(844, 138, 24, 16, ":HUDBVE/Pedro/user.png", 0, 0, 0, tocolor(255, 254, 254, 247), false)
        
        dxDrawRectangle(864, 199, 150, 31, tocolor(0, 0, 0, 172), false)
        
        dxDrawRectangle(839, 199, 35, 31, tocolor(0, 190, 183, 255), false)
        
        dxDrawText("LV", 854, 209, 862, 215, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", false, false, false, false, false)
        
        dxDrawText("$"..money, 926, 36, 948, 41, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)
        
        dxDrawText("$"..bank, 920, 70, 948, 79, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)
        
        dxDrawText(desemp, 927, 106, 942, 110, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)
        
        dxDrawText("" ..playerName, 927, 142, 942, 149, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)
        
        dxDrawText("Procurado: "..wanted, 927, 175, 942, 185, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)
        
        dxDrawText("Level: "..Nivel, 927, 213, 942, 216, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)
        dxDrawImage(856, 414, 199, 53, ":HUDBVE/Pedro/fundo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
        
        dxDrawImage(856, 414, 199, 53, ":HUDBVE/Pedro/fundo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
        
        dxDrawImage(856, 467, 199, 53, ":HUDBVE/Pedro/fundo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
        
        dxDrawImage(856, 467, 199, 53, ":HUDBVE/Pedro/fundo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
        
        dxDrawImage(856, 520, 199, 53, ":HUDBVE/Pedro/fundo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
        
        dxDrawImage(856, 520, 199, 53, ":HUDBVE/Pedro/fundo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
        
        dxDrawText("FOME:", 920, 434, 976, 451, tocolor(255, 255, 255, 255), 0.50, "bankgothic", "center", "center", false, false, false, false, false)
        
        dxDrawText("SEDE:", 921, 483, 977, 500, tocolor(255, 255, 255, 255), 0.50, "bankgothic", "center", "center", false, false, false, false, false)
        
        dxDrawText("SONO:", 922, 536, 978, 553, tocolor(255, 255, 255, 255), 0.50, "bankgothic", "center", "center", false, false, false, false, false)
        dxDrawText(fome.."%", 982, 439, 1002, 446, tocolor(255, 255, 255, 255), 0.50, "bankgothic", "center", "center", false, false, false, false, false)
        
        dxDrawText(sede.."%", 982, 489, 1002, 496, tocolor(255, 255, 255, 255), 0.50, "bankgothic", "center", "center", false, false, false, false, false)
        
        dxDrawText(sono.."%", 982, 543, 1002, 550, tocolor(255, 255, 255, 255), 0.50, "bankgothic", "center", "center", false, false, false, false, false)



end
)

function convertNumber ( number )   
    local formatted = number   
    while true do       
        formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1.%2')     
        if ( k==0 ) then       
            break   
        end   
    end   
    return formatted 
end

Olá, Boa Tarde +1 vez aki pertubando, desculpa, porem vamos lá. Fiz essa HUD, porem ela fica no meio da tela e nao no canto, como corrijo isso?

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