Icon pics

I did everything correctly I think I have the Nyan cat gun in game. But the icon pic for it is black and purple checkered squares. Could someone maybe hop on team viewer and check if I set up the code correctly for the icon to show up.

Where did you put the icon? What format is the icon in? Can you post your code?

if you have team viewer you could hop on and look?

I don’t help over external programs. Can you not just answer the questions?

Ok the icon vtf and vtm are in gamemodes/terrortown/content/materials/VGUI/ttt
and le code is
//TTT Convertion Code \

SWEP.Base = “weapon_tttbase”
SWEP.Kind = WEAPON_EQUIP1
SWEP.CanBuy = { ROLE_DETECTIVE }
SWEP.AutoSpawnable = false
SWEP.InLoadoutFor = nil
SWEP.AllowDrop = true
SWEP.IsSilent = false
SWEP.NoSights = false

if CLIENT then
– Path to the icon material
SWEP.Icon = “VGUI/ttt/cat.vtf” – Text shown in the equip menu
SWEP.EquipMenuData = { type = “Nyan Gun”, desc = “Pelt your foes with rainbow bullets!”
};
end

if SERVER then
resource.AddFile(“materials/VGUI/ttt/cat.vmt”)
end

//TTT Convertion Code \

Do not put it in the gamemodes directory. Put it in your normal materials directory, so the path would be garrysmod/materials/vgui/ttt/cat.vtf.

I did what you said an the icon is still an error.

Change


SWEP.Icon = "VGUI/ttt/cat.vtf" -- Text shown in the equip menu

to


SWEP.Icon = "VGUI/ttt/cat" --SWEP.Icon paths can't have an extension 

That still didn’t work

The issue must be with your FastDL then. Can you post the link to your FastDL server?

It’s hosted off of my computer. We don’t have a FastDL

That’s your issue then. You can’t rely on default ServerDL; pretty sure it’s broken, anyways. You’ll need to send the icon either by FastDL or WorkshopDL. You can host a seperate web host on your own computer if you don’t want to pay for one. Otherwise, workshop is your best option.

The workshop one with a collection? And in there would I put the nyan cat folder?

If you want to use WorkshopDL, you’ll have to send the files to the client using resource.AddWorkshop. Follow Example 1.

Ok so If I add my nyan cat gun to a collection. And in my batch file do that -authkey and all that crap would that work?

-authkey is just for +host_workshop_collection, which you won’t need since you already have the icon on your server. You don’t need a collection nor an authkey; read the link I posted above.

Would that work for models also, and does that go in server config?

Yes. It works for all files in the workshop addon – except lua files obviously. Make a new file in lua/autorun/server that has only


resource.AddWorkshop( "ID" )

Substitute the ID for the Nyan Cat gun ID.

code_gs so every single time that someone joins me they download all the modes the .vtx files there is like 200 of them. And they download it every single time. Should I delete the Halo 3 model pack folder off of my addons? I have them in pointshop the price and stuff. And I did the resource.AddWorkshop thing for it you stated above ^

That’s probably because you had sv_allowdownload set to 1. Make sure it’s 0.