Jump to content

Armor Rectangle [Solved]


undefined

Recommended Posts

dxDrawRectangle(sWidth-185,sHeight-128.5, 154, 6.5, tocolor ( 0, 0, 0, 150 ), false) -- Armor Bar 
     dxDrawRectangle(sWidth-183,sHeight-127,lineaarmor,3.5,tocolor(255,255,255,200) ,false) --Armor 

dxDrawRectangle(sWidth-185,sHeight-128.5, 154, 6.5, tocolor ( 0, 0, 0, 0 ), false) -- Armor Bar 
     dxDrawRectangle(sWidth-183,sHeight-127,lineaarmor,3.5,tocolor(255,255,255,200) ,false) --Armor 

try this not sure if what you want

Link to comment
dxDrawRectangle(sWidth-185,sHeight-128.5, 154, 6.5, tocolor ( 0, 0, 0, 150 ), false) -- Armor Bar 
     dxDrawRectangle(sWidth-183,sHeight-127,lineaarmor,3.5,tocolor(255,255,255,200) ,false) --Armor 

dxDrawRectangle(sWidth-185,sHeight-128.5, 154, 6.5, tocolor ( 0, 0, 0, 0 ), false) -- Armor Bar 
     dxDrawRectangle(sWidth-183,sHeight-127,lineaarmor,3.5,tocolor(255,255,255,200) ,false) --Armor 

try this not sure if what you want

Hahaha :D

Are you intelligent? :D

Link to comment
dxDrawRectangle(sWidth-185,sHeight-128.5, 154, 6.5, tocolor ( 0, 0, 0, 150 ), false) -- Armor Bar 
     dxDrawRectangle(sWidth-183,sHeight-127,lineaarmor,3.5,tocolor(255,255,255,200) ,false) --Armor 
    --dxDrawText(tostring(math.floor(armor+0.1)), sWidth-135, sHeight-128.5, sWidth, sHeight, tocolor(200, 200, 200, 255), 0.5, "bankgothic") -- Armor Yazı 

Armor is 0, do not appear. Like this;

if isElementInWater(localPlayer) then 
     dxDrawRectangle(sWidth-185,sHeight-120.5, 154, 6.5, tocolor ( 0, 0, 0, 150 ), false) -- Oxygen Bar 
     dxDrawRectangle(sWidth-183,sHeight-119, OxygenBar,3.5,tocolor(0,200,255,250) ,false) -- Oxygen 
end --This is breath 

Link to comment

found the problem, Just you have to put it like this for example :

thePlayer = getLocalPlayer () 
function theSettings () 
   setPedArmor(thePlayer, 100) 
end 
addEventHandler("onResourceStart", getRootElement(), theSettings) 

this will make the players armor full when the resource is started

is this what yu wanted?

Link to comment
dxDrawRectangle(sWidth-185,sHeight-128.5, 154, 6.5, tocolor ( 0, 0, 0, 150 ), false) -- Armor Bar 
     dxDrawRectangle(sWidth-183,sHeight-127,lineaarmor,3.5,tocolor(255,255,255,200) ,false) --Armor 
    --dxDrawText(tostring(math.floor(armor+0.1)), sWidth-135, sHeight-128.5, sWidth, sHeight, tocolor(200, 200, 200, 255), 0.5, "bankgothic") -- Armor Yazı 

Armor is 0, do not appear. Like this;

if isElementInWater(localPlayer) then 
     dxDrawRectangle(sWidth-185,sHeight-120.5, 154, 6.5, tocolor ( 0, 0, 0, 150 ), false) -- Oxygen Bar 
     dxDrawRectangle(sWidth-183,sHeight-119, OxygenBar,3.5,tocolor(0,200,255,250) ,false) -- Oxygen 
end --This is breath 

what I understood is that you want the box disappears when I get armor 0

if armor <= 0 then 
  
else 
dxDrawRectangle(sWidth-180,sHeight-73,lineLength2,14.0,tocolor( 0, 0, 0, 150),false) -- Armor active bar 
dxDrawRectangle(sWidth-180,sHeight-73,144.0,14.0,tocolor(0,200,255,250),false) -- Armor inactive bar 
end 

Link to comment
dxDrawRectangle(sWidth-185,sHeight-128.5, 154, 6.5, tocolor ( 0, 0, 0, 150 ), false) -- Armor Bar 
     dxDrawRectangle(sWidth-183,sHeight-127,154*armor,3.5,tocolor(255,255,255,200) ,false) --Armor 
    --dxDrawText(tostring(math.floor(armor+0.1)), sWidth-135, sHeight-128.5, sWidth, sHeight, tocolor(200, 200, 200, 255), 0.5, "bankgothic") -- Armor Yazı 

Edited by Guest
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...