yce Posted October 30, 2018 Author Posted October 30, 2018 I'm making a boss I wanted his life to appear on him but I do not know HI '-'
Dimos7 Posted October 30, 2018 Posted October 30, 2018 (edited) dxDrawRectangle DXDrawBorderedRectangle Edited October 30, 2018 by Dimos7
Moderators IIYAMA Posted October 30, 2018 Moderators Posted October 30, 2018 34 minutes ago, yce said: I could not If you do not know lua, then I can imagine that... lua first, no ifs and buts about it. Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
LilDawage Posted October 30, 2018 Posted October 30, 2018 getElementHealth (ped) DXDrawBorderedRectangle RPG/CnR servers Developer , You want help ? contact me on discord >>>lilDawage#8508<<< i'm at your Service 10/24 hours 7/7 days , >>>Welcome<<< Asking Discord Channel JOIN US ON here , you are welcome 10/24 active
yce Posted October 31, 2018 Author Posted October 31, 2018 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 ) HI '-'
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now