WorkshopDL

Sorry I’ve heard it’s a really good way to download files from the server. But is there a tutorial on how to do it?

Look up the workshop id, from the URL of the workshop addon you want them to download, then simply do:

resource.AddWorkshop( WorkShopID )

Example:

SERVER SIDE:
resource.AddWorkshop( “144415557” )

Alternatively you can grab addons which the server has installed dynamically via: engine.GetAddons( ) and reference the workshop id using table element .wsid

Where do I put this code? Or do I make the file and put it in autorun or somewhere?

Autorun is fine, it’s run SERVER side.

Thank you. I will try it now. Sorry for the extremely late post!

[editline]1st September 2013[/editline]

I’ve made a LUA file named WorkshopDL inside it there is:


resource.AddWorkshop( "174300342" )



It doesn’t work though, the file is inside autorun. Have I done anything wrong?

I know why it wasn’t working. Works all fine now. Thanks for the help.

[editline]1st September 2013[/editline]

Problem. I’ve reopend this.


resource.AddWorkshop( "174300342" )
resource.AddWorkshop( "131246684" )
resource.AddWorkshop( "120766823" )
resource.AddWorkshop( "120765874" )
resource.AddWorkshop( "126921199" )
resource.AddWorkshop( "123455501" )
resource.AddWorkshop( "119148996" )
resource.AddWorkshop( "119146471" )
resource.AddWorkshop( "119148120" )
resource.AddWorkshop( "123455885" )
resource.AddWorkshop( "123456202" )
resource.AddWorkshop( "126920533" )
resource.AddWorkshop( "113120185" )
resource.AddWorkshop( "114001545" )
resource.AddWorkshop( "114000337" )
resource.AddWorkshop( "123455885" )
resource.AddWorkshop( "170149842" )
resource.AddWorkshop( "169011381" )
resource.AddWorkshop( "107411755" )
resource.AddWorkshop( "141657006" )

The error in console!:


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


[editline]1st September 2013[/editline]

Any ideas?

Thanks for rating me dumb when I solved the problem you just posted, above that post.

You didn’t solve the problem. The problem was already solved It was a mistake which I corrected myself. I rated it dumb because all you did was quote something I say and something Acecool said.

And what I quoted was relevant to what you said. You don’t put it in autorun, you put it in autorun/server.

Which is the correction I made before I seen your post^

http://puu.sh/4gtRA.png

I like how you edited your post to make it say server, and then make it back to the original. Lol, I don’t even know why I try to help people anymore…

Yes. I posted my error and read at what Acecool said. Then I changed directories and I’m still getting the same error so I didn’t think that there was a need to change the error text to /server/.