Killicon Help!

I’ve been working on making a swep lately every thing is going well, but i cant get my swep to have a killicon that works.

in the vmt file i have:
“$basetexture” “HUD/killicons/smg2”
“$vertexcolor” 1
“$vertexalpha” 1

in the vtf file i have my killicon.(duh)

this is the code i put in shared.lua for the kill icon:

local Color_Icon = Color( 255, 80, 0, 128 )

killicon.Add( “weapon_SMG2”, “HUD/killicons/smg2.vtf”, Color_Icon ) --Done

when i look in console it says: killicon “smg2” not found.

plz help me fix this

Rename your weapon (“smg2”) to “weapon_smg2”.

Also, your killicon.Add function should target the vmt file, not the vtf.

Thank you so much! but before i can try can you plz tell me what name i need to change(the PrintName or the name of the folder shared.lua is in)?

Change the name of the folder. That determines the class name, which is what GMod actually looks for. The Print name doesn’t matter, it’s just what clients see.

thank you so much! it worked perfectly! but fore some reason i needed to put it in a file in lua\autorun.