Fast Dl Doesn't Work!

Hi, i recently got a fast download on my server but whenever somebody joins it downloads the files to them, even if they have already joined and downloaded the files before. I’m using resource.AddFile() to get the downloads to work is there a fix for this because people have told me that it’s because the file won’t save to the client but i really have no idea. Thanks for any help.

Using resource.AddFile() isn’t fastdl

Oh i don’t think you undertsood lol uhmm im using sv_downloadurl to do fast dl but the files dont download normally so i’m using a resource.AddFile() to get them to download.

what are you trying to make them download, Also if the contend is in a addon folder, you will fail. As fast download forget to add the /addons/<addonname>

No, it doesn’t. Not if you add the resource.addfile into the actual addon/lua folder, it worked fine on my server when I was running one.

I’m using a lua autorun file within the addon itself, lke darksoul said.

FastDL servers are designed to replicate the structure of the server. So if the file is garrysmod/addons/123.lua, then you need to make it exactly the same on the webserver.

Never upload your .lua files, the client wont download them any ways.

last time i checked when i 1st got gmod i had to download 432

Well yes, but what you a actually download is the contend of your cache folder on the server, witch is made up by .dlua files.

-BUMP-

I am having this exact same problem. The clients download the same files each time they join. But it doesnt really download anything, it just seems to say it is. All my folders and files are in the right place on the download url. I am using this code below for the resources.


function AddDir(dir) 
	local list = file.FindDir("../"..dir.."/*")
	for _, fdir in pairs(list) do
		if fdir != ".svn" then 
			AddDir(fdir)
		end
	end
 
	for k,v in pairs(file.Find("../"..dir.."/*")) do
		resource.AddFile(dir.."/"..v)
	end
end
 
AddDir("gamemodes/pgrp/content/models")
AddDir("gamemodes/pgrp/content/materials")
AddDir("gamemodes/pgrp/content/sound")
AddDir("gamemodes/pgrp/content/scripts")

Though this doesn’t seem to work. It is in my garrysmod/lua/autorun folder and im pretty sure thats where it needs to be. The only thing that seems to work is when i make a .res in the maps folder with the same name as the map. And hell no i’m not adding 1000 files manually into there. Anyone have any ideas of what could be wrong?

Are you using FastDL? If so you need to upload your cache directory.

Well xenon servers has a free sv_downloadurl feature. It is http://216.245.206.145/216.245.206.145-27015, which is my server ip so by the looks of it, it seems that the server is using itself as the downloadurl. So the full game directory is already in the downloadurl. Im not sure what you mean by uploading the cache directory. Does anything need to go into the cache/dua? Or just the directory itseft needs to be there. In the case of just the directory of cache/dua having to be there. Yes its there.

EDIT

The problem was that the files to be downloaded were in my gamemodes/pgrp/content folder. They had to be in my garrysmod/materials or models etc. folder.