yce Posted October 30, 2018 Share Posted October 30, 2018 how can i make ped life appear as a GUI? Link to comment
yce Posted October 30, 2018 Author Share Posted October 30, 2018 I'm making a boss I wanted his life to appear on him but I do not know Link to comment
Dimos7 Posted October 30, 2018 Share Posted October 30, 2018 (edited) dxDrawRectangle DXDrawBorderedRectangle Edited October 30, 2018 by Dimos7 Link to comment
Moderators IIYAMA Posted October 30, 2018 Moderators Share 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. Link to comment
LilDawage Posted October 30, 2018 Share Posted October 30, 2018 getElementHealth (ped) DXDrawBorderedRectangle Link to comment
yce Posted October 31, 2018 Author Share 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 ) Link to comment
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