Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. -- Function which allows us to add whole workshop collections to the client auto download
  2. function resource.AddWorkshopCollection( id )
  3.     http.Fetch( "http://steamcommunity.com/sharedfiles/filedetails/?id=" .. id, function( page )       
  4.         for k in page:gmatch( [[<div id="sharedfile_(.-)" class="collectionItem">]] ) do
  5.             resource.AddWorkshop( k )
  6.             print('[WS] Added Workshopfile: ' .. k)
  7.         end
  8.     end )
  9. end
  10.  
  11. -- Timer to wait untill the ressources get available by the server ( in case of sv_hibernate 1 )
  12. timer.Simple(3,function()
  13.     resource.AddWorkshopCollection( "<workshop collection id>" )
  14. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement