• Server not downloading from Workshop
    8 replies, posted
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: [url]http://wiki.garrysmod.com/page/resource/AddWorkshop[/url]
[QUOTE=Robotboy655;44554025]You'll have to use resource.AddWorkshop on all addons you want the client to download. More info: [url]http://wiki.garrysmod.com/page/resource/AddWorkshop[/url][/QUOTE] 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.
[QUOTE=zoooty;44554178]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.[/QUOTE] All that does is put the addons on your server. To actually send them to the client, you need resource.AddWorkshop.
[QUOTE=code_gs;44554259]All that does is put the addons on your server. To actually send them to the client, you need resource.AddWorkshop.[/QUOTE] Alrighty, that has fixed it :-) /thread
Can you post the code you use for the startup, or at least, relating to the issue (although blank out your API key)
[QUOTE=Hashspy;44554970]Can you post the code you use for the startup, or at least, relating to the issue (although blank out your API key)[/QUOTE] [url]http://wiki.garrysmod.com/page/Workshop_for_Dedicated_Servers[/url] He used that along with resource.AddWorkshop, and now his problem is fixed.
[QUOTE=Svenskunganka;44555857][url]http://wiki.garrysmod.com/page/Workshop_for_Dedicated_Servers[/url] He used that along with resource.AddWorkshop, and now his problem is fixed.[/QUOTE] 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.
[QUOTE=PatPeter;45842724]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.[/QUOTE] lua/autorun/server if you're not using if(SERVER) lua/autorun if you're using if(SERVER)
Sorry, you need to Log In to post a reply to this thread.