Health Bar

How do I make my own Health bar?

I am making a Gamemode with different classes to choose from, and I need a health bar.

I cannot figure this one out, could anybody help me? :>

Okay, Thanks!

:raise: 07’er with 5 posts?

Just use the search button, or go to the wiki.

Yeah, dont mind the posts.
Its more like Im never on this forum xD
I just started playing GMod again recently :stuck_out_tongue:

Anyways.
So this is what I got:


function DrawHud()

	health = LocalPlayer():Health()
	draw.RoundedBox( 2, 3, 6, 300, 15, Color( 51, 50, 0, 150 ) )
	draw.RoundedBox( 2, 4, 7, health, 12, Color( 255, 0, 0, 255 ) )
	
end
hook.Add("HUDPaint", "DrawHud", DrawHud)

Where should I add it?

Bring up my first post please <-<

You’re creating your own gamemode with “classes”, but have no idea where to put a simple CLIENTside script?

I’d suggest go start from scratch with your lua or something…

But, just to help you: put it into cl_init.lua

Hehe, Suprise! <-<

No but really.
Its going pretty well you know :wink:

Anyway, Thank you :stuck_out_tongue: