Sup Guys!
My Server didn't download all files from the FastDL :(
I don't know how I bring the server , that it will download!
Maybe with Lua ? I dont know !
And where i should put it in?
[editline]25th July 2013[/editline]
and how i add dir's
I found a thead but it does not work .
I had created a lua in lua/autorun/server/dlfiles.lua
this didn't work!
||
\/
[CODE]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")
AddDir("cache")
AddDir("data")
AddDir("materials")
AddDir("models")
AddDir("settings")
AddDir("sound")
function AddDirLua(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.AddCSLuaFile(dir.."/"..v)
end
end
AddDirLua("lua")[/CODE]
Il get you the file when im on my pc il edit this post once i got the file.
ok first you need a fastdl server and you need the files in the same directory so u want a file called fastdl then you want materials if u want to upload materials to ur fastdl and after that you have to get the directory perfect or it wont work next you need garrysmod/lua/autorun/resoure.lua that file is bassicly where all the resource.add files go the code for resource.add is
[CODE]if (SERVER) then
resource.AddSingleFile( "yourdirectory here/your file here" )
end[/CODE]
now down to the server.cfg
[CODE]"sv_downloadurl" "your fastdl url here so google.co.uk/fastdl thats an example "
"sv_allowdownload" "1"
"sv_allowupload" "1"
"net_maxfilesize" "64"[/CODE]
dont edit any of the others unless you know what your doing
Thanks :)
Sorry, you need to Log In to post a reply to this thread.