>Garrys Mod FastDL Download Files< (help)

I need help in FastDL.

Can anyone write anything, as he has brought so far, the other clients down the land models, songs and materials.

Try many things I’ll do it but not everything went down never bid to clients. Yes except the cache, they always download on my server.

thx 4 help, KRIS

I testet this Codes.

resource.AddFile(“Path, File”)

and the function:

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.."/*")) do
	resource.AddFile(dir.."/"..v)
end

end

and with AddDir(“Path”)

I have readed the post in Wiki, but this not help me :frowning:

Erm. What do you exactly want to do?

I couldn’t understand most of that.

I mean, I need a code or something that people just come to my my server, down to land content.
This is currently not


 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.."/*")) do
		resource.AddFile(dir.."/"..v)
	end
end
 
AddDir("models/yourmodels")
AddDir("models/mymaterials")
AddDir("another/directory")

Do not put AddDir(“models”) or any singular directory it will break.

So something like this:

AddDir(“models/weapon”)

If not then all then downloaded. Everything is inside Weapons?

I just do not have weapons of all the CSS, I do everything, absolutely EVERYTHING drinne which in my srcds folder model and material, uploading, I invite only the things of dne addons high.

[editline]1st June 2011[/editline]

I think I must now do so:

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.."/*")) do
	resource.AddFile(dir.."/"..v)
end

end

AddDir(“models/weapons”)
AddDir(“materials/VGUI”)
AddDir(“sound/dark”)

Right?

Yes that is correct.

Not work Oo

And Now?

Common… I neeeeed Help :frowning: