Ok i was wondering if there was a updated code to this one as i know it is buggy.
And i really dont want to put it every single file on the lines as i have a shit load.
[CODE]local path = "../"..GM.Folder.."/content"
local folders = {""}
while true do
local curdir = table.remove(folders,1)
if not curdir then break end
local searchdir = path..curdir
for _, filename in ipairs(file.Find(searchdir.."/*")) do
if filename ~= ".svn" then
if file.IsDir(searchdir.."/"..filename) then
table.insert(folders,curdir.."/"..filename)
else
resource.AddFile(string.sub(curdir.."/"..filename,2))
end
end
end
end[/CODE]
^ this code should download every file in the content folder.
is this code stable and works?
Sorry, you need to Log In to post a reply to this thread.