function AddDir(dir) // recursively adds everything in a directory to be downloaded by client
local list = file.FindDir("../"..dir.."/*")
for _, fdir in pairs(list) do
if fdir != ".svn" then // don't spam people with useless .svn folders
AddDir(fdir)
end
end
for k,v in pairs(file.Find("../"..dir.."/*")) do
resource.AddFile(dir.."/"..v)
end
end
AddDir( "addons/Fading Doors/lua/weapons/gmod_tool/stools" )
AddDir( "addons/M9K Assault Rifles" )
Resource.AddDir( "addons" )
AddDir( "addons" )
resource.AddWorkshop( "104996105" ) --Rp_Downtown_v4c
resource.AddWorkshop( "105115318" ) --Fading_Door
resource.AddWorkshop( "151259497" ) --Drug_Mod
resource.AddWorkshop( "147708337" ) --Guns
resource.AddWorkshop( "104479831" ) --Stacker'
resource.AddSingleFile( "addons/Stacker Stool/lua/weapons/gmod_tool/stools/stacker.lua" )
resource.AddCSLuaFile( "addons/Stacker Stool/lua/weapons/gmod_tool/stools/stacker.lua" )
resource.AddWorkshop("147708337") --Mad Cow's
resource.AddWorkShop("105115318") --fading
resource.AddCSLuaFile( "addons/Keypad Tool + Cracker/lua/enties/keypad/cl_init.lua" )
resource.AddCSLuaFile( "addons/Keypad Tool + Cracker/lua/enties/keypad/init.lua" )
resource.AddCSLuaFile( "addons/Keypad Tool + Cracker/lua/enties/keypad/sh_init.lua" )
resource.AddSingleFile( "addons/Keypad Tool + Cracker/lua/enties/keypad/cl_init.lua" )
resource.AddSingleFile( "addons/Keypad Tool + Cracker/lua/enties/keypad/init.lua" )
resource.AddSingleFile( "addons/Keypad Tool + Cracker/lua/enties/keypad/sh_init.lua" )
resource.AddCSLuaFile( "addons/Fading Doors/lua/weapons/gmod_tool/stools/fading_door.lua" )
resource.AddSingleFile( "addons/Fading Doors/lua/weapons/gmod_tool/stools/fading_door.lua" )
Resources.lua, Yes, they are on the FASTdl
You should of put the code inside [code] [/code] tags.
Where did you place this file?
Another thing, clients do not have to 'download' lua files.
Sorry, I placed the file in /garrysmod/lua/autorun/server
Use this;
[code]
if SERVER then
resource.AddWorkshop("104996105") -- Rp_Downtown_v4c
resource.AddWorkshop("151259497") -- Drug's Mod
resource.AddWorkshop("147708337") -- Mad Cow's Weapons
resource.AddWorkShop("128089118") -- M9K Assault Rifles
end
[/code]
Call it workshopdownloads.lua and place it inside garrysmod/lua/autorun/server/
I made that just by looking at what you had put in the OP.
M9K weapons didnt download.
Check this page out: [url]http://wiki.garrysmod.com/page/Server/Workshop[/url]
[QUOTE=74pantera;41878122]M9K weapons didnt download.[/QUOTE]
Just tested that code, M9K [B]Assault Rifles[/B] downloaded for me. There are other packs for M9K such as M9K Special Weapons and you will need to add that to the code I gave you.
Hmm, do i have to add it to the FASTdl?
[QUOTE=74pantera;41886049]Hmm, do i have to add it to the FASTdl?[/QUOTE]
No, this is downloading from the workshop. All you have to do is add the code to a file in lua/autorun/sever/
It worked fine. Just you know, i know the mistake that i/you made on the M9K,
resource.AddWorkShop < capital S, should be resource.AddWorkshop
[QUOTE=74pantera;41899637]It worked fine. Just you know, i know the mistake that i/you made on the M9K,
resource.AddWorkShop < capital S, should be resource.AddWorkshop[/QUOTE]
Ah ok, glad you got it sorted out, you may want to lock this thread now.
Sorry, you need to Log In to post a reply to this thread.