Jump to content

Ped Health


yce

Recommended Posts

 

I did like this

 

 

 

ht = 0
r,g,b = 200,200,200
local sx_, sy_ = guiGetScreenSize()
local sx, sy = sx_/1024, sy_/768

addEventHandler("onClientRender", root,
function()
getElementHealth(ped)
DXDrawBorderedRectangle(322*sx, 686*sy, 379*sx/100*ht, 27*sy, tocolor(200, 0, 0, 200), false) --- DAMAGE
dxDrawImage(322*sx, 686*sy, 379*sx/100*75, 27*sy, "files/health.png", 0, 0, 0, tocolor(255, 255, 255, 30), false)
dxDrawRectangle(322*sx, 686*sy, 379*sx/100*getElementHealth(localPlayer), 27*sy, tocolor(r,g,b, 255), false)
if getElementHealth(localPlayer) <= 30 then
r,g,b = 200,0,0
else
r,g,b = 200,200,200
end
end
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...