Jump to content

How import HUD?


Recommended Posts

How import HUD (blood, food, drink, temperature icons) with MTA DayZ 0.7b1 to MTA DayZ 0.6 r294?

Im have decompiled files. Im find lines responsible for show icons in MTA DayZ 0.6 r294.

Its is file survivorSystem_client.lua, details this line:

        --sound 
        dxDrawImage ( screenWidth*0.9325 , screenHeight*0.41, screenHeight*0.075, screenHeight*0.075, "images/dayzicons/sound.png",0,0,0,tocolor(0,255,0)) 
        local sound = getElementData(getLocalPlayer(),"volume")/20 
        if sound > 1 then 
            dxDrawImage ( screenWidth*0.9075 , screenHeight*0.41, screenHeight*0.075, screenHeight*0.075, "images/dayzicons/level_"..sound..".png",0,0,0,tocolor(0,255,0)) 
        end 
        --visibly 
        dxDrawImage ( screenWidth*0.9325 , screenHeight*0.475, screenHeight*0.075, screenHeight*0.075, "images/dayzicons/eye.png",0,0,0,tocolor(0,255,0)) 
        local sound = getElementData(getLocalPlayer(),"visibly")/20 
        if sound > 1 then 
            dxDrawImage ( screenWidth*0.9075 , screenHeight*0.475, screenHeight*0.075, screenHeight*0.075, "images/dayzicons/level_"..sound..".png",0,0,0,tocolor(0,255,0)) 
        end 
        --brokenbone 
        if getElementData(getLocalPlayer(),"brokenbone") then 
            dxDrawImage ( screenWidth*0.9375 , screenHeight*0.55, screenHeight*0.065, screenHeight*0.065, "images/dayzicons/brokenbone.png",0,0,0,tocolor(255,255,255)) 
        end 
        --bandit     
        local humanity =  getElementData(getLocalPlayer(),"humanity") 
        if humanity > 0 then 
            local humanity =  getElementData(getLocalPlayer(),"humanity")/9.8 
            r,g,b = 255-humanity,humanity,0 
        else     
            r,g,b = 255,0,0 
        end 
            dxDrawImage ( screenWidth*0.925 , screenHeight*0.6, screenHeight*0.1, screenHeight*0.1, "images/dayzicons/bandit.png",0,0,0,tocolor(r,g,b)) 
        --temperature 
        local temperature = math.round(getElementData(getLocalPlayer(),"temperature"),2) 
        r,g,b = 0,255,0 
        if temperature <= 37 then 
            value = (37-temperature)*42.5 
            r,g,b = 0,255-value,value 
        elseif temperature > 37 and temperature < 41 then 
            r,g,b = 0,255,0 
        elseif temperature == 41 then 
            r,g,b = 255,0,0 
        end 
        if value > 215 then 
            dxDrawImage ( screenWidth*0.94 , screenHeight*0.7, screenHeight*0.065, screenHeight*0.065, "images/dayzicons/temperature.png",0,0,0,tocolor(r,g,b,fading)) 
        else 
            dxDrawImage ( screenWidth*0.94 , screenHeight*0.7, screenHeight*0.065, screenHeight*0.065, "images/dayzicons/temperature.png",0,0,0,tocolor(r,g,b)) 
        end 
        --thirsty 
        r,g,b = 0,255,0 
        local thirst = getElementData(getLocalPlayer(),"thirst")*2.55 
        r,g,b = 255-thirst,thirst,0 
        if thirst < 15 then 
            dxDrawImage ( screenWidth*0.94 , screenHeight*0.775, screenHeight*0.065, screenHeight*0.065, "images/dayzicons/thirsty.png",0,0,0,tocolor(r,g,b,fading)) 
        else 
            dxDrawImage ( screenWidth*0.94 , screenHeight*0.775, screenHeight*0.065, screenHeight*0.065, "images/dayzicons/thirsty.png",0,0,0,tocolor(r,g,b)) 
        end     
        --blood 
        r,g,b = 0,255,0 
        local blood = getElementData(getLocalPlayer(),"blood")/47.2 
        r,g,b = 255-blood,blood,0 
        dxDrawImage ( screenWidth*0.94 , screenHeight*0.85, screenHeight*0.065, screenHeight*0.065, "images/dayzicons/blood.png",0,0,0,tocolor(r,g,b)) 
        if getElementData(getLocalPlayer(),"bleeding") > 0 then 
            dxDrawImage ( screenWidth*0.94 , screenHeight*0.85, screenHeight*0.065, screenHeight*0.065, "images/dayzicons/medic.png",0,0,0,tocolor(255,255,255,fading)) 
        end 
        --food 
        r,g,b = 0,255,0 
        local food = getElementData(getLocalPlayer(),"food")*2.55 
        r,g,b = 255-food,food,0 
        if food < 15 then 
            dxDrawImage ( screenWidth*0.94 , screenHeight*0.925, screenHeight*0.065, screenHeight*0.065, "images/dayzicons/food.png",0,0,0,tocolor(r,g,b,fading)) 
        else 
            dxDrawImage ( screenWidth*0.94 , screenHeight*0.925, screenHeight*0.065, screenHeight*0.065, "images/dayzicons/food.png",0,0,0,tocolor(r,g,b)) 
        end   

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