Jump to content

Bad File Path Hud do MTA


Recommended Posts

function SousaHud ( ... )
    if (not isPlayerMapVisible()) then

        local dinheiro = getPlayerMoney(localPlayer)
        local banco = getElementData(localPlayer, "bank.money") or "0"
        local vida = math.floor(getElementHealth(getLocalPlayer()))
        local colete = math.floor(getPedArmor(getLocalPlayer()))
        local fome = getElementData(getLocalPlayer(), "AirNewSCR_Fome") or 0
        local sede = getElementData(getLocalPlayer(), "AirNewSCR_Sede") or 0
        local weapon = getPedWeaponSlot (getLocalPlayer())
        local weaponClip = getPedAmmoInClip(getLocalPlayer(), getPedWeaponSlot(getLocalPlayer()))
        local weaponAmmo = getPedTotalAmmo (getLocalPlayer()) - getPedAmmoInClip (getLocalPlayer())

        dxDrawRectangle(screenW * 0.7176, screenH * 0.0078, screenW * 0.1375, screenH * 0.0365, tocolor(0, 0, 0, 138), false)
        dxDrawRectangle(screenW * 0.8596, screenH * 0.0078, screenW * 0.1375, screenH * 0.0365, tocolor(0, 0, 0, 138), false)
        dxDrawText("R$"..dinheiro, screenW * 0.7463, screenH * 0.0026, screenW * 0.8551, screenH * 0.0378, tocolor(0, 209, 14, 254), 1.10, "default-bold", "left", "bottom", false, false, false, false, false)
        dxDrawText("R$"..banco, screenW * 0.8882, screenH * 0.0026, screenW * 0.9971, screenH * 0.0378, tocolor(0, 206, 208, 254), 1.10, "default-bold", "left", "bottom", false, false, false, false, false)
        dxDrawImage(screenW * 0.7250, screenH * 0.0130, screenW * 0.0140, screenH * 0.0247, ":Icons/Dinheiro.png", 0, 0, 0, tocolor(0, 209, 14, 254), false)
        dxDrawImage(screenW * 0.8669, screenH * 0.0130, screenW * 0.0169, screenH * 0.0260, ":Icons/Banco.png", 0, 0, 0, tocolor(0, 206, 236, 254), false)
        dxDrawRectangle(screenW * 0.8596, screenH * 0.0547, screenW * 0.1375/100*fome, screenH * 0.0260, tocolor(241, 142, 0, 254), false)
        dxDrawRectangle(screenW * 0.8596, screenH * 0.0938, screenW * 0.1375/100*sede, screenH * 0.0260, tocolor(0, 170, 240, 254), false)
        dxDrawImage(screenW * 0.8596, screenH * 0.0534, screenW * 0.0169, screenH * 0.0273, ":Icons/Fome.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
        dxDrawImage(screenW * 0.8596, screenH * 0.0938, screenW * 0.0169, screenH * 0.0260, ":Icons/Sede.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
        dxDrawText(fome.."%", screenW * 0.8985, screenH * 0.0547, screenW * 0.9654, screenH * 0.0807, tocolor(254, 254, 255, 254), 1.00, "default-bold", "center", "center", false, false, false, false, false)
        dxDrawText(sede.."%", screenW * 0.8985, screenH * 0.0938, screenW * 0.9654, screenH * 0.1198, tocolor(254, 254, 255, 254), 1.00, "default-bold", "center", "center", false, false, false, false, false)
        dxDrawRectangle(screenW * 0.7176, screenH * 0.0534, screenW * 0.1375/100*vida, screenH * 0.0260, tocolor(169, 0, 0, 254), false)
        dxDrawRectangle(screenW * 0.7176, screenH * 0.0924, screenW * 0.1375/100*colete, screenH * 0.0260, tocolor(109, 109, 109, 254), false)
        dxDrawImage(screenW * 0.7250, screenH * 0.0534, screenW * 0.0140, screenH * 0.0234, ":Icons/Vida.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
        dxDrawImage(984, 71, 21, 20, ":Icons/Colete.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
        dxDrawText(colete.."%", screenW * 0.7537, screenH * 0.0924, screenW * 0.8206, screenH * 0.1185, tocolor(254, 254, 255, 254), 1.00, "default-bold", "center", "center", false, false, false, false, false)
        dxDrawText(vida.."%", screenW * 0.7537, screenH * 0.0534, screenW * 0.8206, screenH * 0.0794, tocolor(254, 254, 255, 254), 1.00, "default-bold", "center", "center", false, false, false, false, false)
        dxDrawImage(screenW * 0.7868, screenH * 0.1198, screenW * 0.2103, screenH * 0.1393, ":Icons/Armas/"..weapon..".png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
        dxDrawText(weaponClip.."/"..weaponAmmo, screenW * 0.8934, screenH * 0.1953, screenW * 0.9971, screenH * 0.2266, tocolor(173, 173, 173, 254), 1.00, "pricedown", "center", "center", false, false, false, false, false)

    end
end

Olá, eu to fazendo uma hud e na hora que fui botar para ele mudar o icone da arma conforme a arma que o jogador segura, ele aparece o erro :

WARNING: [BS]Hud/c_SousaHud.lua:37: Bad file path @ 'dxDrawImage' [:Icons/Armas/5.png]

Mas com todas as linhas que tem a função "dxDrawImage", aconteceu isso após eu mexer na linha :

dxDrawImage(screenW * 0.7868, screenH * 0.1198, screenW * 0.2103, screenH * 0.1393, ":Icons/Armas/"..weapon..".png", 0, 0, 0, tocolor(255, 255, 255, 255), false)

Preciso muito que alguém me ajude a resolver, se precisarem de mais informações para ajudar, é só pedir, estarei online!

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