Hello everyone.
I'm trying to upload files to users via Steam workshop, packed the two gma archive laid out in the WS,
registered in the autorun resource.AddWorkShop (some_id_of_addon), I go to the server, swing,
but when I go to the server I see that there are no files, open the downloads/server/ empty. download/ too empty ...
I've already signed them to the server via the config and all the same content again after rejoining "downloaded" but nothing
I get the same thing. it says I'm downloading them, but they dont appear on the server. for instance, if I put in the addon advanced duplicator, it will make me download it, but it wont be on the server.
The thing I've had to do, is extract them with Sharp Gmad, make an Addon.txt, and add it to the server.
You guys don't understand resource.AddWorkshop, do you?
I've never tried to use the resource.Addworkshop but if you are the server host then use [url=http://wiki.garrysmod.com/page/Workshop_for_Dedicated_Servers]this.[/url] It works fine for me, it automatically forces the clients to download the collection.
resource.AddWorkshop doesn't support collections.
[QUOTE=supersnail11;41799361]You guys don't understand resource.AddWorkshop, do you?[/QUOTE]
Yes, i know.. GaleTheHusky not about being told
Fairly sure that resource.AddWorkshop just tells the client what addons to download, it doesn't add anything to the server itself.
[QUOTE=code_gs;41799415]resource.AddWorkshop doesn't support collections.[/QUOTE]
Yes. i know. I inserted the id Addons, not collections
[editline]12th August 2013[/editline]
[QUOTE=EvacX;41799509]Fairly sure that resource.AddWorkshop just tells the client what addons to download, it doesn't add anything to the server itself.[/QUOTE]
I do not need to add anything to the server it already has everything I need to send 2 add-on to the client
Sending 2 Lua addons is basically useless if they only are lua files.
The only use for resource.AddWorkshop is downloading models, materials, sounds, particles, etc.
[QUOTE=Tenrys;41800352]Sending 2 Lua addons is basically useless if they only are lua files.
The only use for resource.AddWorkshop is downloading models, materials, sounds, particles, etc.[/QUOTE]
of course.
I'm not saying that I'm sending lua, I send the model, materials, and sounds from my TTT
Alright so here is how you use resource.lua! :dance:
step 1: Make a lua document called resource.lua.
step 2: Place your resource.lua in this directory lua/autorun/server (either via FTP or manually)
step 3: If you wont to add downloads to the resource.lua open it up, and put the following
[CODE]resource.AddWorkshop( "workshopid" )[/CODE]
and there you go!
My resource.lua
[CODE]resource.AddWorkshop( "121961644" )
resource.AddWorkshop( "142916690" )
resource.AddWorkshop( "115375720" )
resource.AddWorkshop( "149491742" )
resource.AddWorkshop( "152323095" )
resource.AddWorkshop( "123581457" ) [/CODE]
use this to allow the server to download and mount addons [url]http://wiki.garrysmod.com/page/Workshop_for_Dedicated_Servers[/url]
as said addworkshop is just to force people to download the add ons as an alternative to fastdl
I don't think AddWorkshop actually works unless your server has the same workshop file loaded.
[QUOTE=Triage;41801945]Alright so here is how you use resource.lua! :dance:
step 1: Make a lua document called resource.lua.
step 2: Place your resource.lua in this directory lua/autorun/server (either via FTP or manually)
step 3: If you wont to add downloads to the resource.lua open it up, and put the following
[CODE]resource.AddWorkshop( "workshopid" )[/CODE]
and there you go!
My resource.lua
[CODE]resource.AddWorkshop( "121961644" )
resource.AddWorkshop( "142916690" )
resource.AddWorkshop( "115375720" )
resource.AddWorkshop( "149491742" )
resource.AddWorkshop( "152323095" )
resource.AddWorkshop( "123581457" ) [/CODE][/QUOTE]
It worked! Thanks, apparently the problem was that the file is not called resource.lua, and init.lua
[QUOTE=Koji6ac9H;41807571]It worked! Thanks, apparently the problem was that the file is not called resource.lua, and init.lua[/QUOTE]
File name doesn't matter as long as there's no other file with that name.
[QUOTE=Robotboy655;41807591]File name doesn't matter as long as there's no other file with that name.[/QUOTE]
That has got to be one of the most common mistakes for new lua coders. I can't count the amount of times when a person has asked me or someone else where to put their Lua files or what to call them, when in the vast majority of cases it doesn't even matter as long as it's ran at the right time.
He added me over Steam and I helped him. He thought resource.AddWorkshop and +host_workshop_collection could not be used in conjunction with each other.
[QUOTE=Koji6ac9H;41807571]It worked! Thanks, apparently the problem was that the file is not called resource.lua, and init.lua[/QUOTE]
Good stuff man, glad to help!
Sorry, you need to Log In to post a reply to this thread.