• Images in gamemode HUD?
    10 replies, posted
Alright, so I have been working on a flood gamemode and found basic HUD tutorials on the "Garrys Mod Wiki". So I started thinking what I want on my HUD in the gamemode. I have seen other gamemodes like "gmod tower" and such with images on the HUD. So I was wondering, how do you do it? Thanks so much guys. :)
I [i]think[/i] you have to use [b][url=http://wiki.garrysmod.com/?title=Surface.SetTexture]Surface.SetTexture [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] and [b][url=http://wiki.garrysmod.com/?title=Surface.DrawTexturedRect]Surface.DrawTexturedRect [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
[QUOTE=Drakehawke;31591570]I [i]think[/i] you have to use [b][url=http://wiki.garrysmod.com/?title=Surface.SetTexture]Surface.SetTexture [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] and [b][url=http://wiki.garrysmod.com/?title=Surface.DrawTexturedRect]Surface.DrawTexturedRect [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b][/QUOTE] Thanks, but how could I use these in lua to show an image?
Did you even click the links? There's even examples describing exactly what you are trying to accomplish.
[QUOTE=_nonSENSE;31592143]Did you even click the links? There's even examples describing exactly what you are trying to accomplish.[/QUOTE] yes I clicked the links, I'm just not getting it. [editline]7th August 2011[/editline] What I mean is, where do I put the image?
You have to convert the image into a VTF ([b]V[/b]alve [b]T[/b]exture [b]F[/b]ile), and then draw a textured box with it.
[QUOTE=Drakehawke;31592399]You have to convert the image into a VTF ([b]V[/b]alve [b]T[/b]exture [b]F[/b]ile), and then draw a textured box with it.[/QUOTE] Ok, and would I have to put my vtf into a certain folder? Because I want people that connect to the gamemode to have it as well. Thanks for all of your help :)
It should go in garrysmod/garrysmod/materials on the server, and then to make it send to the clients use [b][url=http://wiki.garrysmod.com/?title=Resource.AddFile]Resource.AddFile [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
[QUOTE=Drakehawke;31592560]It should go in garrysmod/garrysmod/materials on the server, and then to make it send to the clients use [b][url=http://wiki.garrysmod.com/?title=Resource.AddFile]Resource.AddFile [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b][/QUOTE] And when people join the server, will the loading screen say "Downloading blank.vtf", or will it just appear with the gamemode?
"Downloading blank.vtf"
[QUOTE=Drakehawke;31592797]"Downloading blank.vtf"[/QUOTE] Thanks so much!
Sorry, you need to Log In to post a reply to this thread.