SWEP Hud icon doesn't work

My SWEP hud icon just don’t want to work… what am I doing wrong?
I’ve put the .vtf & .vmt files into “materials/weapons/”, but nothing happened, here the .vmt codes:



"UnlitGeneric"
{
	"$basetexture" "weapons/ioncannonicon"
	"$ignorez" "1"
	"$vertexcolor" "1"
	"$vertexalpha" "1"
	"$nolod" "1"
}


hud icon? You mean the sandbox spawnmenu icon?

The weapon hud icon thing when you scroll or press numbers on your keyboard to select weapons.

You gotta specify SWEP.WepSelectIcon

But I also need the .vtf files inside a folder called “hud” right?

The file path doesn’t matter at all.

You just gotta put it into the variable I mentioned.


SWEP.WepSelectIcon		= surface.GetTextureID( "weapons/swep" )

It worked, but it shows the purple & black image… the size of my image is 512x256 if that has something to do with.

Nevermind, got it. Thanks.

You specified the wrong image/your vmt is incorrect.