Jump to content

Healt Progress


#Paper

Recommended Posts

Posted

There is already default resource: "race" and in there file called: "fancyprogress.lua" - there you can find it.

Also the nametags.lua has it too.

Posted (edited)
addEventHandler("onClientRender",getRootElement(), 
function () 
if ( somebar ) then 
    local veh = getPedOccupiedVehicle(getLocalPlayer()) 
    if veh then 
    health = getElementHealth(veh)/100*10 
    guiProgressBarSetProgress(somebar, health) 
      end 
   end 
end) 

It should work.

Edited by Guest

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
addEventHandler("onClientRender",getRootElement(), 
function () 
if ( somebar ) then 
    local veh = getPedOccupiedVehicle(getLocalPlayer() 
    if veh then 
    health = math.floor(getElementHealth(veh)) 
    guiProgressBarSetProgress(somebar, health) 
      end 
   end 
end) 

It should work.

No, it doesn't work, and doesn't show any error...

P.S: You forgot a ')' to close getPedOccupiedVehicle, i added it :D

mtaubluascripter.png

My skype: skiper964

I helped you? Help me! ^^

Help me bro! ^^

Posted

Do you have the progress bar someBar?

And btw, i know i had a missing ')' but i wanted you to fix it, i was a bit hurry.

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

I will try it later, right now i'am busy.

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

Ok, i have changed the code, try it now.

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.

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