• Drawing a model on a HUD? (Like a gun, or a playermodel)
    4 replies, posted
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? [img]http://puu.sh/2Y130.jpg[/img] <-- Example.
Hook used: [url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexd65c.html[/url] Example: [url]http://code.google.com/p/tiramisu-rp/source/browse/trunk/tiramisu/gamemode/schemas/global/plugins/hud/cl_healthhud.lua?spec=svn10&r=10[/url]
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.
[QUOTE=Minteh Fresh;40738199]That doesn't really help much..[/QUOTE] 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 [url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index0d85.html[/url] and also have a look at how the function is coded here [url]https://github.com/garrynewman/garrysmod/blob/master/garrysmod/lua/vgui/dmodelpanel.lua[/url]
Sorry, you need to Log In to post a reply to this thread.