• Weapon Hud
    11 replies, posted
So I've been doing some lua HUD editing, but i really dunno how to change the weapon HUD: [img]http://i46.tinypic.com/n1rm0l.jpg[/img] So um does anybody know where the texture files for these things are? Or can this also be done by lua?
To hide the hud so you can make your own, use [b][url=wiki.garrysmod.com/?title=Gamemode.HUDShouldDraw]Gamemode.HUDShouldDraw [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] To edit the current hud without using lua see this: [url]http://www.moddb.com/games/half-life-2/tutorials/changing-the-hud-colour-layout-fonts-effects[/url] (if the files aren't in the folder, you need to extract them using [url=http://nemesis.thewavelength.ne/]gcfscape[/url]) I would hide the hud and create my own hud.
*Faceplams* This is exactly what i was worried. I clearly stated in the picture what i need. And i would prefer the thing being in lua form. The wiki you showed me is just for the health, armor and ammo. I need for the Weapon Selection. Even if i can't change the form of the boxes and stuff, atleast the colors
*Facepalms* If you had read the wiki page a little better, you would've seen this. [img]http://dl.dropbox.com/u/2399384/lrn2read.jpg[/img]
If you want your weapon to have a custom icon in there ( which I think is what you want ), there's two ways to do it. You can write a function with the draw and surface libraries to draw it in this method: [code] function SWEP:DrawWeaponSelection( x, y, width, height, alpha ) end [/code] [b][url=wiki.garrysmod.com/?title=SWEP.DrawWeaponSelection]SWEP.DrawWeaponSelection [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] And you can see the default code for the method [url=http://luabin.foszor.com/code/gamemodes/base/entities/weapons/weapon_base/cl_init.lua#29]here[/url] Is that more along the lines of what you meant? If you intend to actually replace the selection hud, your question was answered already and I misread what you wanted.
i think he just wants to make his own weapon selection hud thingy. i've seen it done before :P
[QUOTE=ZenX2;19664817]i think he just wants to make his own weapon selection hud thingy. i've seen it done before :P[/QUOTE] Yes, I do. But if I don't figure out how I am always open to suggestions on how to change the colors of the original Weapon Menu. (aka from Orange to Blue)
Download tacoscript, and read through their code and get an idea of what to do.
[QUOTE=antid2;19669109]Download tacoscript, and read through their code and get an idea of what to do.[/QUOTE] If I can find a real one. Looks like there are Hoaxes of this thing all over the site.
i have tacoscript 2, but idk if i can send it out, i don't know if i would get in trouble or something lol, but i thought there was a thread a while back
The last 3 I downloaded apparently have pictures with a character called Joe who loves Donuts..
Woop woop. [media]http://uppix.net/6/e/2/8688c75f355352d6e1db4af3a4b3a.jpg[/media] You don't really have any choice, you need to write your selection menu entirely from scratch, and override the behaviour of slot1, slot2, ..., slot9, invnext, invprev and +attack using [b][url=wiki.garrysmod.com/?title=Gamemode.PlayerBindPress]Gamemode.PlayerBindPress [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]. And obviously, use [b][url=wiki.garrysmod.com/?title=Gamemode.HUDPaint]Gamemode.HUDPaint [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] or VGUI panels for actually drawing the menu. Can't really bother explaining further right now, but if you're not very good at Lua, you're going to have a hard time coding this.
Sorry, you need to Log In to post a reply to this thread.