Jump to content

Armor Rectangle [Solved]


undefined

Recommended Posts

Posted
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 

Posted
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

Posted
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

Posted

what are you trying to tell friend and please explain ;)

WANT SCRIPTS? I SELL LIKE AN ANIMATED CUSTOMISED GUI FOR 5USD AND AN RPG GAMEMODE FOR 30USD ONLY. IF YOU NEED SPECIAL SCRIPTS THEN I SELL EACH FOR 5 USD.

Posted
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 

Posted

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?

WANT SCRIPTS? I SELL LIKE AN ANIMATED CUSTOMISED GUI FOR 5USD AND AN RPG GAMEMODE FOR 30USD ONLY. IF YOU NEED SPECIAL SCRIPTS THEN I SELL EACH FOR 5 USD.

Posted

That's all wrong, onResourceStart is a server side event and getLocalPlayer is a client side only function.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
onClientResourceStart() 

sorry I had forgotten client ;D

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

WANT SCRIPTS? I SELL LIKE AN ANIMATED CUSTOMISED GUI FOR 5USD AND AN RPG GAMEMODE FOR 30USD ONLY. IF YOU NEED SPECIAL SCRIPTS THEN I SELL EACH FOR 5 USD.

Posted

setPedArmor is a server side only function.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
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 

Posted

Castillo, it used to work in my server when I make it client sided

why not now

WANT SCRIPTS? I SELL LIKE AN ANIMATED CUSTOMISED GUI FOR 5USD AND AN RPG GAMEMODE FOR 30USD ONLY. IF YOU NEED SPECIAL SCRIPTS THEN I SELL EACH FOR 5 USD.

Posted

I highly doubt it, since that function always been server side.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

so MTA functions that are seperated will be seperated even if tried to trigger it via server?

WANT SCRIPTS? I SELL LIKE AN ANIMATED CUSTOMISED GUI FOR 5USD AND AN RPG GAMEMODE FOR 30USD ONLY. IF YOU NEED SPECIAL SCRIPTS THEN I SELL EACH FOR 5 USD.

Posted

I don't get what do you mean, the wiki shows which functions and events are server/client/shared.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted (edited)
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

Omerta Roleplay

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