Drawing a model on a HUD? (Like a gun, or a playermodel)

Hey guys, I’m trying to make it so I can make a model appear on the top of my screen, but I’m not quite sure how to do this? Like how perp does it when you create a character, or for example, like this hud. I’d assume you can’t do this with any (perfectly conveniently placed) surface.DrawModel :c

And there’s be vgui involved but I’m not sure?

http://puu.sh/2Y130.jpg

<-- Example.

Hook used: http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexd65c.html Example: http://code.google.com/p/tiramisu-rp/source/browse/trunk/tiramisu/gamemode/schemas/global/plugins/hud/cl_healthhud.lua?spec=svn10&r=10

That doesn’t really help much…

You can either use DModelPanel or use a ClientsideModel and draw it in your HUD. I believe you can see how that is done in the source code of DModelPanel.

Well what sort of help do you want? I gave you links to what you could refer to and I don’t see how it isn’t enough? Couldn’t you try something similar to the example in the link?

[editline]22nd May 2013[/editline]

Actually don’t worry about what I said, go with what Robotboy655 said, DModelPanel was actually what I was looking for when I tried to help you yesterday but couldn’t remember that it was called that so only came across the other.

[editline]22nd May 2013[/editline]

Okay now that I’ve looked into this more I’m actually interested in it (the function). Look into http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index0d85.html and also have a look at how the function is coded here https://github.com/garrynewman/garrysmod/blob/master/garrysmod/lua/vgui/dmodelpanel.lua