Hello i create a custom hud but i want to make a vertical health bar and when i set it the life begin
to the bot and finish top but i want to it begin top and when i loose health it go bot
Thank you for the help and if you want some screenshot for see somethink i can give you that
Some code would help more than a screenshot
[editline]29th May 2016[/editline]
Also, if you mean what I think you mean, something as simple as this:
[CODE]
hook.Add( 'HUDPaint', 'healthbar', function()
local height = 200 * ( LocalPlayer():Health() / LocalPlayer():GetMaxHealth() ) -- 200 is the size of the bar when you have full health
surface.SetDrawColor( 0, 255, 0, 255 )
surface.DrawRect( 10, ScrH() - height - 10, 50, height ) -- The reason I used 10 a couple of times here was just for a margin between the edge and the bar
end )
[/CODE]
Draws a green bar that starts closer to the top, and when you loose health, it goes to the bottom.
thanks but i find how to make that but thanks anyway :D
Sorry, you need to Log In to post a reply to this thread.