Need help with Custom TTT icons not showing up at all.

I am the ‘Lead Dev’ for a Australian TTT server and I have run into a problem where Shop icons are not showing up.
I have tried everything I can think of doing. I have made custom icons for all the weapons in TTT and have linked them in the lua file but they are not working. The FastDL has them, They do download when you join the server and I was doing other work adding sound effects at the same time so I know FastDL is working but I am not sure what the issue is.

I have also tried putting the actual icons in other directories such as materials and addons rather than the place where all the ttt icons usually reside.
the bit of lua for the Icon is shown below

SWEP.Icon = "materials/VGUI/ttt/icon_ak472"

I have already formatted the icon to the right size 64x64 and have matched the settings in VTFedit. I have put the vmt file with the vtf file.

I am out of ideas and was hoping for some support here.

For reference purposes I have edited the following lua files.
All lua files in the weapons directory for terrortown gamemode
garrysmod\gamemodes errortown\gamemode\cl_search.lua
gamemodes errortown\gamemode\equip_items_shd.lua

Thanks in advance

Do you have it resource.AddFile’d? A suggestion would be to move the files onto your local pc and try on single player - if they work there, then it’s a downloading problem but if they don’t then you know the file itself is borked

What he said, and if your server is running running linux (or if your fastdownload is running linux) be sure that the files on your fastdl have an identical case formatting (UPPERCASE / lowercase).

Even be sure that the resource.AddFile() has identical case formatting, otherwise the download simply will not work.

EDIT: When I say case formatting i mean within files and folders, just in case that wasn’t clear enough.

Yes I have Resource.AddFile (“materials/VGUI/ttt/icon_ak472.vmt”)
No script errors show up so I am not sure if that is an issue.
As for what OS the servers are running I am not sure as it is not my own dedicated server to control it is rented from a provider.

Pretty sure you addfile the vtf and the vmt is added automatically, not the other way around.

Ok I will give that a go I am fairly new to lua and I thought it was the vmt you put in.
EDIT: I won’t be able to test the changes for a few hours as its primetime on my server I try to schedule non-essential reboots until late night.

Remove the materials in swep.icon. Have it say
SWEP.Icon = “VGUI/ttt/icon_ak472”

Also put this somewhere in the gun
[lua]if SERVER then
resource.AddFile( “materials/VGUI/ttt/icon_ak472.vmt” )
resource.AddFile( “materials/VGUI/ttt/icon_ak472.vtf” )

If you still don’t get it working add me on steam and I’ll be glad to help.

I would like that thanks I hope it isn’t too much trouble I wouldn’t be able to work on it until 11pm brisbane time.

No problem, I won’t be on for another 6 hours because of school :-/

Also make sure you have the correct settings in vtf edit when making the vmt. If not, this will result in a flickering icon in-game for the players.

Also make sure you don’t have any icons with the same name installed on your gmod, gmod is too dumb to download the same file twice.


This is the code for the AK47

if SERVER then
AddCSLuaFile( “shared.lua” )

if CLIENT then
SWEP.PrintName = “AK47”
SWEP.Slot = 6 – add 1 to get the slot number key
SWEP.Icon = “materials/vgui/ttt/icon_ak472.vtf”
SWEP.ViewModelFOV = 72
SWEP.ViewModelFlip = true
SWEP.EquipMenuData = {
type = “Weapon”,
desc = “AK47; One Clip. Destroys people at close range.”


– Always derive from weapon_tttbase.
SWEP.Base = “weapon_tttbase”

— Standard GMod values

SWEP.HoldType = “ar2”

SWEP.Spawnable = false
SWEP.Primary.Delay = 0.08
SWEP.Primary.Recoil = 1.9
SWEP.Primary.Automatic = true
SWEP.Primary.Damage = 32
SWEP.Primary.Cone = 0.125
SWEP.Primary.ClipSize = 30
SWEP.Primary.ClipMax = 0
SWEP.HeadshotMultiplier = 3
SWEP.Primary.DefaultClip = 30
SWEP.Primary.Sound = Sound( “Weapon_AK47.Single” )

SWEP.IronSightsPos = Vector( 6.05, -5, 2.4 )
SWEP.IronSightsAng = Vector( 2.2, -0.1, 0 )

SWEP.ViewModel = “models/weapons/v_rif_ak47.mdl”
SWEP.WorldModel = “models/weapons/w_rif_ak47.mdl”
SWEP.CanBuy = {ROLE_TRAITOR} – only traitors can buy
SWEP.LimitedStock = true – only buyable once

— TTT config values

– Kind specifies the category this weapon is in. Players can only carry one of
– Matching SWEP.Slot values: 0 1 2 3 4 6 7 8

– If AutoSpawnable is true and SWEP.Kind is not WEAPON_EQUIP1/2, then this gun can
– be spawned as a random weapon. Of course this AK is special equipment so it won’t,
– but for the sake of example this is explicitly set to false anyway.
SWEP.AutoSpawnable = false

– The AmmoEnt is the ammo entity that can be picked up when carrying this gun.

– If IsSilent is true, victims will not scream upon death.
SWEP.IsSilent = false

– If NoSights is true, the weapon won’t have ironsights
SWEP.NoSights = false


Remove the .vtf from swep.icon. Have it say

SWEP.Icon = “materials/vgui/ttt/icon_ak472”

Already tried that didn’t work.