Yes, via gamemode. An example would be a basic one derived to Sandbox.
[QUOTE=Horsey;16288165]Yes, via gamemode.[/QUOTE]
Not necessarily, you can hook to HUDPaint.
[QUOTE=Horsey;16288165]Yes, via gamemode.[/QUOTE]
Uhh, what?
You can make your own HUD, use the hook HUDPaint.
[editline]08:19PM[/editline]
Damn ninjas.
That too.
An example function:
[code]
function NewHUD()
local health = LocalPlayer():Health() / 100
draw.RoundedBox( 0, 5, 5, ( 200 * health ) + 0, 3, Color( 190, 0, 0, 255 ) );
end
hook.Add( "HUDPaint", "NewHUD", NewHUD );
[/code]
i dont know antthing about lua but can sombody make me a hud that has a simple health bar so i can get started on it?
There is a full tutorial on the wiki, duh
link?
Jesus christ. I just gave you an example, Wobbier.
[lua]
function NewHUD()
local health = LocalPlayer():Health() / 100
draw.RoundedBox( 0, 5, 5, ( 200 * health ) + 0, 3, Color( 190, 0, 0, 255 ) );
end
hook.Add( "HUDPaint", "NewHUD", NewHUD );
[/lua]
That's a simple healthbar.
ok i told u i dont know anything about lua u still didnt tell me where to put it
Sorry, you need to Log In to post a reply to this thread.