Server workshop addons automatically install

Ok so Garry released a video on automatically downloading the servers workshop addons when you join. I see it on alot of servers and I want to know how to do it. Please comment on how to do it I already have my collection set up and addons on the server now I just need to set it up where the add-ons download for users that don’t have them when they join
:
:
Garry’s video: http://m.youtube.com/watch?v=430qLp8md0A
:
:

[editline]2nd August 2013[/editline]

Bump.
Sorry I really need this.

Post your collection link and I’ll do it for you.

Idk how your gonna do it but whatever http://steamcommunity.com/sharedfiles/filedetails/?id=154259102

and?

Yea it doesn’t make sense how he’s gonna do it :confused:

Done. Place the workshopdl.lua file from inside the zip to lua/autorun/server

http://puu.sh/3Sy4n

If I add any addon to it will it automaticly add it do people download it?

No; you’ll have to manually add it to the file. You can use a program like notepad to do that, I prefer Notepad ++. Anyways, here’s the file code:


//Fading Doors
resource.AddWorkshop("110871780")
//Stacker
resource.AddWorkshop("105115318")
//Keypad Crakcer
resource.AddWorkshop("104479831")
//Climb
resource.AddWorkshop("108424005")
//Legs
resource.AddWorkshop("113495466")
//Fall Sounds
resource.AddWorkshop("113585399")
//Moneypot
resource.AddWorkshop("109653316")
//Nomad
resource.AddWorkshop("109905241")
//Textscreens
resource.AddWorkshop("104516493")
//Rape
resource.AddWorkshop("109643223")
//Drugs
resource.AddWorkshop("104910430")
//Gemstone Printers
resource.AddWorkshop("112986621")
//Adv Dupe
resource.AddWorkshop("106958912")
//Hit Numbers
resource.AddWorkshop("163806212")

To add something, you’d an a // and whatever you want to help you remember which addon is which. Under that, you’ll put resource.AddWorkshop("")

Inside the parenthesis is the ID of the addon. To find the addon ID, go to the addon’s page, and look at the ending of the URL. It should say something like ?id=123456. Just put the numbers in the parenthesis. So if you wanted to add, let’s say the playable piano, you’d put


//Piano
resource.AddWorkshop("104548572")

since that ID is at the end of the URL (http://steamcommunity.com/sharedfiles/filedetails/?id=104548572).

So just take the file I already made, and whenever you want to add a new addon, add it to the collection, and then the ID at the end of the file.

got this


[ERROR] lua/autorun/workshop.lua:1: attempt to call field 'AddWorkshop' (a nil value)
  1. unknown - lua/autorun/workshop.lua:1


Not lua/autorun, lua/autorun/server

thank you and sorry :smiley:

It’s fine. Tell me if you have any issues/if everything works correctly.

OMG it works!

[editline]3rd August 2013[/editline]

THANK YOU!

No problem :slight_smile:

This was way easier that fastdl

FastDL has it’s perks too; the issue for most people is creating a proper resource list and having their own webhost.

[editline]3rd August 2013[/editline]

But yes, WorkshopDL is really easy.

Yea

Hello! I’m getting Almost the same error like alastor does but I have mine in lua/autorun/server


[ERROR] lua/autorun/server/workshopdl.lua:2: attempt to call field 'addworkshop' (a nil value)
1. unknown - lua/autorun/server/workshopdl.lua:2

And my server is uptodate! So I really don’t know what to do!

(Fixed - I wrote addworkshop but need to write AddWorkshop)