Forced download problem

Hello, Recently I began using a script that allows me to select entire directory’s for the players to download when they connect to my server. The problem is even though they already have the files after joining once, they server keeps making them re-download them every time they connect/map change/restart.

Heres the script I am using:


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/content")


Thankyou!

If you’re using FastDL, the files don’t exist on the web server that you’re using. Make sure to take all the materials/models/etc from any gamemode or addon you’re using and place them inside the main garrysmod directory.