Gamemode.HUDPaint

From GMod Wiki

Revision as of 21:45, 2 February 2011 by Donkie (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Event Hook
Hook NameHUDPaint
SyntaxGM:HUDPaint( )
DescriptionUsed to draw things on your screen.
ReturnsNil
Lua StateNewerClient.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.HUDPaint]Gamemode.HUDPaint [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionDraw a box in the upper left hand corner of the screen.
Used onNewerClient.png
Code
function DrawBox()
	draw.RoundedBox( 10, 0, 0, 100, 100, Color(0, 0, 0, 180) );
end
hook.Add("HUDPaint", "DrawBox", DrawBox);
 
OutputDraws a box in the upper left hand corner of the screen.


DescriptionDraw a box on the bottom of your screen.
Used onNewerClient.png
Code
function RoundedBoxHook()
draw.RoundedBox( 8, 5, ScrH()-105, 250, 100, Color(0, 0, 0, 180) );
end
hook.Add("HUDPaint", "RoundedBoxHud", RoundedBoxHook)
 
OutputGmhud.png


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox