Hi there,
I was wondering how I would go about doing a direct HTTP transfer of files rather than through the gmod protocol.
I have tried to set this up, (i want to transfer a model for instance) & (i have looked at: [url]http://wiki.garrysmod.com/?title=Setting_up_sv_downloadurl[/url]) and it talks about a server.cfg file i need to set with sv_downloadurl (the file is not in the server garrysmod/cfg/ and i dont know why it isnt), i need it to = [url]http://www.zdark.com/garrysmod/[/url]
Could someone inform me precisely how to set this up?
url:
[url]http://www.zdark.com/garrysmod/[/url]
files (directory download):
AddDir("models/dean")
AddDir("materials/models/chase")
The files are run through:
[lua]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("models/dean")
AddDir("materials/models/chase")[/lua]
Sorry, you need to Log In to post a reply to this thread.