SRCDS Steam group


addfile-gmod
#1
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(dir.."/"..fdir)
end
end

for k,v in pairs(file.Find(dir.."/*", true)) do
resource.AddFile(dir.."/"..v)
end
end

AddDir("addons")

would this send the entire addons directory? I am trying to be positive that they have all the models, sounds, materials, resources, etc. How would this be possible? and where would I put the lua code. I tried putting it in /gamemode/sandbox/init.lua. and that made for hell on earth. so. I dont think I will do that again.
Reply
#2
Post it on the FacePunch forums, I don't think you'll get any answers here.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)