Jump to content

[HELP] I need help in the script "health bar"


@RUSH

Recommended Posts

qqC46q1.png 

AbvWj8k.png

 

My code: 

		local stat = getPedStat (getLocalPlayer(), 24)
		local health = math.floor( getElementHealth( getLocalPlayer() )) 	
	
		if stat > 1000 then
			dxDrawRectangle(x*33, y*729, x*130, y*12, tocolor(0,0,0,40), false)
			dxDrawRectangle(x*35, y*731, x*126/200*health, y*8, tocolor(65,255,65,200), false)	
		else
			dxDrawRectangle(x*33, y*729, x*130, y*12, tocolor(0,0,0,40), false)
			dxDrawRectangle(x*35, y*731, x*126/100*health, y*8, tocolor(65,255,65,200), false)

		end
			dxDrawRectangle(x*167, y*729, x*62, y*12, tocolor(0,0,0,40), false)
			
			dxDrawRectangle(x*234, y*729, x*62, y*12, tocolor(0,0,0,40), false)

 

Edited by @RUSH
Link to comment
7 minutes ago, NeXuS™ said:

Give me a second. Gonna check it on my server.

NP, thankyou man :)

 

--

EDIT:

7 minutes ago, NeXuS™ said:

Give me a second. Gonna check it on my server.

Brother, thank you soo much, i change: if stat 100 then for if health 100 then

And, its work 100%: 3J4Viln.png

 

Thanks for you help. <3

Edited by @RUSH
Work
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...