Server not downloading from Workshop

Hi, I set up a collection and put an api key and the collection id into the startup command and everything downloads to the server fine.

When I client connects to the server, they do not download any files from the collection. Why is this and how can I fix it?

You’ll have to use resource.AddWorkshop on all addons you want the client to download.

More info: http://wiki.garrysmod.com/page/resource/AddWorkshop

It says if the items are in my collection I shouldn’t have to do this though. They are in a collection and I have it in the launch parameters of my server.

All that does is put the addons on your server. To actually send them to the client, you need resource.AddWorkshop.

Alrighty, that has fixed it :slight_smile:

/thread

Can you post the code you use for the startup, or at least, relating to the issue (although blank out your API key)

He used that along with resource.AddWorkshop, and now his problem is fixed.

But where do you put the resource.AddWorkshop? I created a new addon called _autoload and added all my resource.AddWorkshop calls in it with an AddCSLuaFile, but it doesn’t work.

lua/autorun/server if you’re not using if(SERVER)
lua/autorun if you’re using if(SERVER)