Players have to download models/materials/sounds every time they join?

Basically what the title says.
Example:
Let’s say someone needs to download DurgzMod materials & models.
They download it and the next time they join the server, they have to download it again.
Any ideas?

Make a download file called dl.lua (you can change the dl part to whatever you want), place it in lua/autorun/server/. Then open it, and on the first line put
file.Delete(“whatever/my.file”)
Do this for every file, make sure you only put one of these codes per line, and add 3 spaces before file.Delete.
If you want a client to DOWNLOAD the file however, do the same as above except use resource.AddFile(“whatever/my.file”)
You’re welcome. Enjoy!

…Yes I want the client to download the file, and my FastDL is set up perfectly fine I believe…here’s my code.
[lua]
function resource.AddDir(dir)
dir = string.Replace(dir,"\\", “/”)
dir = string.Replace(dir, “\”, “/”)

local files, dirs = file.Find(dir.."/*", "GAME")

for k, v in pairs(dirs) do
	resource.AddDir(dir.."/"..v)
end

for k, v in pairs(files) do
	local realpath = dir.."/"..v

	if(string.find(realpath, "addons", nil, false) ~= nil) then
		local path_array = string.Explode("/", dir.."/"..v)
		table.remove(path_array, 1)
		table.remove(path_array, 1)

		realpath = string.Implode("/", path_array)
	end

	resource.AddFile(realpath)
end

end

resource.AddDir(“addons/firearms/materials”)
resource.AddDir(“addons/firearms/sound”)
resource.AddDir(“addons/firearms/models”)
resource.AddDir(“addons/damageeffect/materials/vortex”)
resource.AddDir(“addons/durgz/models”)
resource.AddDir(“addons/durgz/materials”)
resource.AddDir(“addons/extinguisher/materials”)
resource.AddDir(“addons/extinguisher/models”)
resource.AddDir(“addons/extinguisher/sound”)
resource.AddDir(“addons/Realisticblood/materials”)
[/lua]

You don’t need to use resource.AddDir("").
Do something like this:

— Start File

— Win Music
resource.AddFile(“sound/song1.mp3”)
resource.AddFile(“sound/song2.mp3”)
resource.AddFile(“sound/song3.mp3”)
resource.AddFile(“sound/song4.mp3”)
resource.AddFile(“sound/song5.mp3”)
resource.AddFile(“sound/song6.mp3”)
resource.AddFile(“sound/song7.mp3”)
resource.AddFile(“sound/song8.mp3”)
resource.AddFile(“sound/song9.mp3”)
resource.AddFile(“sound/song10.mp3”)
resource.AddFile(“sound/song11.mp3”)
resource.AddFile(“sound/song12.mp3”)
resource.AddFile(“sound/song13.mp3”)
resource.AddFile(“sound/song14.mp3”)
resource.AddFile(“sound/song15.mp3”)
resource.AddFile(“sound/song16.mp3”)
resource.AddFile(“sound/song17.mp3”)
resource.AddFile(“sound/song18.mp3”)
resource.AddFile(“sound/song19.mp3”)
resource.AddFile(“sound/song20.mp3”)
resource.AddFile(“sound/song21.mp3”)
resource.AddFile(“sound/song22.mp3”)
resource.AddFile(“sound/song23.mp3”)
resource.AddFile(“sound/song24.mp3”)
resource.AddFile(“sound/song25.mp3”)
resource.AddFile(“sound/song26.mp3”)
resource.AddFile(“sound/song27.mp3”)
resource.AddFile(“sound/song28.mp3”)
resource.AddFile(“sound/song29.mp3”)
resource.AddFile(“sound/song30.mp3”)
resource.AddFile(“sound/song31.mp3”)
resource.AddFile(“sound/song32.mp3”)
resource.AddFile(“sound/song33.mp3”)
resource.AddFile(“sound/song34.mp3”)
— End Win Music

— Custom weapons

— VAL
resource.AddFile(“sound/vx/weapons/val/val.wav”)
resource.AddFile(“materials/models/weapons/v_models/OLAFASVAL/other.vmt”)
resource.AddFile(“materials/models/weapons/v_models/OLAFASVAL/reciever.vmt”)
resource.AddFile(“materials/models/weapons/v_models/OLAFASVAL/wpn_vss.vmt”)
resource.AddFile(“materials/models/weapons/other.vmt”)
resource.AddFile(“materials/models/weapons/reciever.vmt”)
resource.AddFile(“materials/models/weapons/wpn_vss.vmt”)
resource.AddFile(“models/weapons/v_rif_val.mdl”)
resource.AddFile(“materials/models/weapons/w_rif_ak47.mdl”)
— End VAL

— Intervention
resource.AddFile(“materials/models/weapons/v_models/M82/M82.vmt”)
resource.AddFile(“materials/models/weapons/w_models/M82/M82.vmt”)
resource.AddFile(“materials/models/weapons/v_models/M98B/Main.vmt”)
resource.AddFile(“materials/models/weapons/v_models/M98B/Scope.vmt”)
resource.AddFile(“models/weapons/v_snip_hex.mdl”)
resource.AddFile(“models/weapons/w_snip_hex.mdl”)
resource.AddFile(“sound/vx/weapons/intervention/shoot.wav”)
— End Intervention

— SPAS-12
resource.AddFile(“materials/models/weapons/v_models/spas-12/spas.vmt”)
resource.AddFile(“materials/models/weapons/w_models/w_spas12/spas.vmt”)
resource.AddFile(“models/weapons/v_shot_xm10141.mdl”)
resource.AddFile(“models/weapons/w_shot_xm10141.mdl”)
resource.AddFile(“sound/vx/weapons/spas-12/shoot.wav”)
resource.AddFile(“sound/vx/weapons/spas-12/insertshell.wav”)
resource.AddFile(“sound/vx/weapons/spas-12/pump.wav”)
— End SPAS-12

— Colt
resource.AddFile(“models/weapons/v_pist_colt19.mdl”)
resource.AddFile(“models/weapons/w_pist_colt19.mdl”)
resource.AddFile(“materials/models/weapons/v_models/Kimono_1911/1911.vmt”)
resource.AddFile(“materials/models/weapons/v_models/Kimono_1911/Mag.vmt”)
resource.AddFile(“materials/models/weapons/v_models/Kimono_1911/1911.vmt”)
resource.AddFile(“materials/models/weapons/v_models/Kimono_1911/Mag.vmt”)
resource.AddFile(“sound/vx/colt/fire.wav”)
resource.AddFile(“sound/vx/colt/draw.wav”)
resource.AddFile(“sound/vx/colt/empty.wav”)
resource.AddFile(“sound/vx/colt/in.wav”)
resource.AddFile(“sound/vx/colt/out.wav”)
resource.AddFile(“sound/vx/colt/slide.wav”)
— End Colt

— G36C
resource.AddFile(“models/weapons/v_op2_g36.mdl”)
resource.AddFile(“models/weapons/w_op2_g36.mdl”)
resource.AddFile(“materials/models/weapons/v_models/arby26_g36c/g36c_light1.vmt”)
resource.AddFile(“materials/models/weapons/v_models/arby26_g36c/g36c_main.vmt”)
resource.AddFile(“materials/models/weapons/v_models/arby26_g36c/g36c_d.vtf”)
resource.AddFile(“materials/models/weapons/v_models/arby26_g36c/g36c_exp.vtf”)
resource.AddFile(“materials/models/weapons/v_models/arby26_g36c/g36c_gloss.vtf”)
resource.AddFile(“materials/models/weapons/v_models/arby26_g36c/g36c_n.vtf”)
resource.AddFile(“materials/models/weapons/w_models/arby26_g36c/m4_light1_d.vtf”)
resource.AddFile(“materials/models/weapons/w_models/arby26_g36c/m4_light1_n.vtf”)
resource.AddFile(“materials/rg/rg_parascope.vmt”)
resource.AddFile(“sound/vx/g36c/m4a1-2.wav”)
resource.AddFile(“sound/vx/g36c/clipin.wav”)
resource.AddFile(“sound/vx/g36c/clipout.wav”)
resource.AddFile(“sound/vx/g36c/empty.wav”)
resource.AddFile(“sound/vx/g36c/m4a1_boltcatch.wav”)
resource.AddFile(“sound/vx/g36c/m4a1_boltpull.wav”)
resource.AddFile(“sound/vx/g36c/m4a1_clipin.wav”)
resource.AddFile(“sound/vx/g36c/m4a1_clipout.wav”)
resource.AddFile(“sound/vx/g36c/m4a1_deploy.wav”)
resource.AddFile(“sound/vx/g36c/m4a1_silencer_off.wav”)
resource.AddFile(“sound/vx/g36c/m4a1_silencer_on.wav”)
resource.AddFile(“sound/vx/g36c/m4a1_silencer_on.wav”)
resource.AddFile(“sound/vx/g36c/m4a1_unsil-1.wav”)
resource.AddFile(“sound/vx/g36c/m4a1_unsil-2.wav”)
resource.AddFile(“sound/vx/g36c/m16_boltcatch.wav”)
resource.AddFile(“sound/vx/g36c/shell1.wav”)
resource.AddFile(“sound/vx/g36c/shell2.wav”)
resource.AddFile(“sound/vx/g36c/shell3.wav”)
— End G36c

— SV-98
resource.AddFile(“models/weapons/v_snip_awp2.mdl”)
resource.AddFile(“materials/models/Nirrti/BFP4F/weapons/shared/PKS-07.vmt”)
resource.AddFile(“materials/models/Nirrti/BFP4F/weapons/shared/scope_glass.vmt”)
resource.AddFile(“materials/models/Nirrti/BFP4F/weapons/scope_glass.vmt”)
resource.AddFile(“materials/models/Nirrti/BFP4F/weapons/SV-98/rounds.vmt”)
resource.AddFile(“materials/models/Nirrti/BFP4F/weapons/SV-98/SV-98.vmt”)
resource.AddFile(“materials/models/Nirrti/BFP4F/weapons/SV-98/SV-98_mag.vmt”)
resource.AddFile(“materials/models/weapons/v_models/hands/t_phoenix.vmt”)
resource.AddFile(“materials/models/weapons/v_models/watch/TS_belt_difffuse.vmt”)
resource.AddFile(“materials/models/weapons/v_models/watch/TS_watch_difffuse.vmt”)
resource.AddFile(“materials/models/weapons/v_models/watch/TS_watch_diffuse.vmt”)
resource.AddFile(“materials/models/weapons/v_models/watch/TS_watch_glass.vmt”)
resource.AddFile(“sound/vx/sv98/fire.wav”)
resource.AddFile(“sound/vx/sv98/boltback.wav”)
resource.AddFile(“sound/vx/sv98/boltlock.wav”)
resource.AddFile(“sound/vx/sv98/boltpush.wav”)
resource.AddFile(“sound/vx/sv98/clipin.wav”)
resource.AddFile(“sound/vx/sv98/clipout.wav”)
resource.AddFile(“sound/vx/sv98/cliptap.wav”)
resource.AddFile(“sound/vx/sv98/deploy.wav”)
resource.AddFile(“sound/vx/sv98/foley.wav”)
resource.AddFile(“sound/vx/sv98/inserting.wav”)
— End SV-98

— Jihad
resource.AddFile(“materials/VGUI/ttt/c4_bomb.vmt”)
resource.AddFile( “sound/siege/jihad.wav” )
resource.AddFile( “sound/siege/big_explosion.wav” )
resource.AddFile( “models/weapons/v_jb.mdl” )
resource.AddFile( “models/weapons/v_jb.dx80” )
resource.AddFile( “models/weapons/v_jb.dx90” )
resource.AddFile( “models/weapons/v_jb.sw.vtx” )
resource.AddFile( “models/weapons/v_jb.vvd” )
resource.AddFile( “models/weapons/w_jb.mdl” )
resource.AddFile( “models/weapons/w_jb.dx80” )
resource.AddFile( “models/weapons/w_jb.dx90” )
resource.AddFile( “models/weapons/w_jb.sw.vtx” )
resource.AddFile( “models/weapons/w_jb.vvd” )
resource.AddFile( “models/weapons/w_jb.phy” )
resource.AddFile( “sound/siege/jishad.wav” )
resource.AddFile( “sound/siege/big_explosion.wav” )
resource.AddFile( “materials/models/weapons/v_models/pr0d.c4/bomb1.vmt” )
resource.AddFile( “materials/models/weapons/v_models/pr0d.c4/bomb1.vtf” )
resource.AddFile( “materials/models/weapons/v_models/pr0d.c4/bomb1_planted.vtf” )
resource.AddFile( “materials/models/weapons/v_models/pr0d.c4/bomb1_ref.vtf” )
resource.AddFile( “materials/models/weapons/v_models/pr0d.c4/bomb2.vmt” )
resource.AddFile( “materials/models/weapons/v_models/pr0d.c4/bomb2.vtf” )
resource.AddFile( “materials/models/weapons/v_models/pr0d.c4/bomb3b.vmt” )
resource.AddFile( “materials/models/weapons/v_models/pr0d.c4/bomb3b.vtf” )
resource.AddFile( “materials/models/weapons/v_models/pr0d.c4/and.vmt” )
resource.AddFile( “materials/models/weapons/v_models/pr0d.c4/hand.vtf” )
resource.AddFile( “materials/models/weapons/v_models/pr0d.c4/screen_04.vmt” )
resource.AddFile( “materials/models/weapons/v_models/pr0d.c4/screen_04.vtf” )
resource.AddFile( “materials/models/weapons/v_models/pr0d.c4/screen_45.vmt” )
resource.AddFile( “materials/models/weapons/v_models/pr0d.c4/screen_45.vtf” )
resource.AddFile( “materials/models/weapons/v_models/pr0d.c4/screen_active.vmt” )
resource.AddFile( “materials/models/weapons/v_models/pr0d.c4/screen_active.vtf” )
resource.AddFile( “materials/models/weapons/v_models/pr0d.c4/screen_off.vmt” )
resource.AddFile( “materials/models/weapons/v_models/pr0d.c4/screen_off.vtf” )
resource.AddFile( “materials/models/weapons/v_models/pr0d.c4/screen_off_ref.vtf” )
resource.AddFile( “materials/models/weapons/v_models/pr0d.c4/screen_on.vmt” )
resource.AddFile( “materials/models/weapons/v_models/pr0d.c4/screen_on.vtf” )
resource.AddFile( “materials/models/weapons/v_models/pr0d.c4/screen_on_ref.vtf” )
resource.AddFile( “materials/models/weapons/w_models/pr0d.c4/bomb1.vmt” )
resource.AddFile( “materials/models/weapons/v_models/pr0d.c4/bomb1_planted.vmt” )
resource.AddFile( “materials/models/weapons/w_models/pr0d.c4/bomb2.vmt” )
resource.AddFile( “materials/models/weapons/w_models/pr0d.c4/bomb3b.vmt” )
resource.AddFile( “materials/models/weapons/w_models/pr0d.c4/hand.vmt” )
resource.AddFile( “materials/models/weapons/w_models/pr0d.c4/screen_04.vmt” )
resource.AddFile( “materials/models/weapons/w_models/pr0d.c4/screen_45.vmt” )
resource.AddFile( “materials/models/weapons/w_models/pr0d.c4/screen_active.vmt” )
resource.AddFile( “materials/models/weapons/w_models/pr0d.c4/screen_on.vmt” )
resource.AddFile( “materials/models/weapons/w_models/pr0d.c4/screen_off.vmt” )
— End Jihad

— SVT-40
resource.AddFile(“sound/vx/svt-40/SVT-1.wav”)
resource.AddFile(“models/weapons/v_snip_svt40.mdl”)
resource.AddFile(“materials/models/weapons/v_models/svt40/PU_d.vmt”)
resource.AddFile(“materials/models/weapons/v_models/svt40/SVT_d.vmt”)
resource.AddFile(“materials/models/weapons/v_models/svt40/PU_diff.vtf”)
resource.AddFile(“materials/models/weapons/v_models/svt40/PU_gloss.vtf”)
resource.AddFile(“materials/models/weapons/v_models/svt40/PU_n.vtf”)
resource.AddFile(“materials/models/weapons/v_models/svt40/PU_s.vtf”)
resource.AddFile(“materials/models/weapons/v_models/svt40/SVT_diff.vtf”)
resource.AddFile(“materials/models/weapons/v_models/svt40/SVT_n.vtf”)
resource.AddFile(“materials/models/weapons/v_models/svt40/SVT_s.vtf”)
— End SVT-40

— M24
resource.AddFile(“models/weapons/v_snip_m24sn.mdl”)
resource.AddFile(“models/weapons/w_snip_m24sn.mdl”)
resource.AddFile(“materials/models/weapons/v_models/Request B2/Frame M24 Body.vmt”)
resource.AddFile(“materials/models/weapons/v_models/Request B2/Frame M24 Lens.vmt”)
resource.AddFile(“materials/models/weapons/v_models/Request B2/Frame M24 Body D.vtf”)
resource.AddFile(“materials/models/weapons/v_models/Request B2/Frame M24 Body N.vtf”)
resource.AddFile(“materials/models/weapons/v_models/Request B2/Frame M24 Lens D.vtf”)
resource.AddFile(“materials/models/weapons/v_models/Request B2/Frame M24 Lens N.vtf”)
resource.AddFile(“materials/models/weapons/w_models/Request B2/Frame M24 Body.vmt”)
resource.AddFile(“materials/models/weapons/w_models/Request B2/Frame M24 Lens.vmt”)
resource.AddFile(“sound/vx/m24/fire.wav”)
— End M24

— 99Dreams
resource.AddFile(“models/weapons/v_shot_xm10142.mdl”)
resource.AddFile(“models/weapons/w_shot_xm10142.mdl”)
resource.AddFile(“materials/models/weapons/v_models/mw3_aa12/mw3_aa12.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mw3_aa12/mw3_aa12.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mw3_attachments/mw3_acog_reticle.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mw3_attachments/mw3_acog_reticle_base.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mw3_attachments/mw3_eotech_crosshair.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mw3_attachments/mw3_eotech_lense.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mw3_attachments/mw3_eotech_reticle.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mw3_attachments/mw3_hamr_lense.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mw3_attachments/mw3_hamr_reflex_lense.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mw3_attachments/mw3_HAMR_reticle.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mw3_attachments/mw3_heartbeat_screen.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mw3_attachments/mw3_hybrid_reticle.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mw3_attachments/mw3_magnifier_lense.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mw3_attachments/mw3_red_dot_sight_lense.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mw3_attachments/mw3_reticle.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mw3_attachments/mw3_thermal_scope_screen.vmt”)
resource.AddFile(“sound/vx/99dreams/fire.wav”)
— End 99Dreams

— Saiga-12
resource.AddFile(“models/weapons/v_saiga12k.mdl”)
resource.AddFile(“materials/models/weapons/v_models/Saiga12k/grip.vmt”)
resource.AddFile(“materials/models/weapons/v_models/Saiga12k/SG_saiga12.vmt”)
resource.AddFile(“sound/vx/saiga-12/fire.wav”)
— End Saiga-12

— SCAR-H
resource.AddFile(“models/weapons/v_bf3_rc_scarh.mdl”)
resource.AddFile(“models/weapons/w_bf3_rc_scarh.mdl”)
resource.AddFile(“sound/vx/scarh/fire.wav”)
resource.AddFile(“materials/models/weapons/v_models/hands/moh_hands.vmt”)
resource.AddFile(“materials/models/weapons/v_models/scarh/Ironsight.vmt”)
resource.AddFile(“materials/models/weapons/v_models/scarh/Suppressor.vmt”)
resource.AddFile(“materials/models/weapons/v_models/scar-h/Ironsight.vmt”)
resource.AddFile(“materials/models/weapons/v_models/scar-h/Lower.vmt”)
resource.AddFile(“materials/models/weapons/v_models/scar-h/Magazine.vmt”)
resource.AddFile(“materials/models/weapons/v_models/scar-h/Muzzle.vmt”)
resource.AddFile(“materials/models/weapons/v_models/scar-h/Upper.vmt”)
resource.AddFile(“materials/models/weapons/v_models/Barrel/Bipod.vmt”)
resource.AddFile(“materials/models/weapons/v_models/Barrel/Flashhider.vmt”)
resource.AddFile(“materials/models/weapons/v_models/Barrel/Muzzle.vmt”)
resource.AddFile(“materials/models/weapons/v_models/Barrel/Suppressor.vmt”)
resource.AddFile(“materials/models/weapons/v_models/Side/Anpeq2.vmt”)
resource.AddFile(“materials/models/weapons/v_models/Side/FlashLight.vmt”)
resource.AddFile(“materials/models/weapons/v_models/Sights/Ironsights.vmt”)
— End SCAR-H

— Chainsaw
resource.AddFile(“models/weapons/v_chainsaw.mdl”)
resource.AddFile(“models/weapons/w_chainsaw.mdl”)
resource.AddFile(“materials/archysaw/sprite_bloodspray1.vmt”)
resource.AddFile(“materials/archysaw/sprite_bloodspray2.vmt”)
resource.AddFile(“materials/archysaw/sprite_bloodspray3.vmt”)
resource.AddFile(“materials/archysaw/sprite_bloodspray4.vmt”)
resource.AddFile(“materials/archysaw/sprite_bloodspray5.vmt”)
resource.AddFile(“materials/archysaw/sprite_bloodspray6.vmt”)
resource.AddFile(“materials/archysaw/sprite_bloodspray7.vmt”)
resource.AddFile(“materials/archysaw/sprite_bloodspray8.vmt”)
resource.AddFile(“materials/models/weapons/v_chainsaw/body.vmt”)
resource.AddFile(“materials/models/weapons/v_chainsaw/chainsaw.vmt”)
resource.AddFile(“materials/models/weapons/v_chainsaw/chainsaw_chain.vmt”)
resource.AddFile(“materials/models/weapons/v_chainsaw/parts.vmt”)
resource.AddFile(“materials/models/weapons/w_chainsaw/body.vmt”)
resource.AddFile(“materials/models/weapons/w_chainsaw/chainsaw.vmt”)
resource.AddFile(“materials/models/weapons/w_chainsaw/chainsaw_chain.vmt”)
resource.AddFile(“materials/models/weapons/w_chainsaw/parts.vmt”)
resource.AddFile(“sound/weapons/arch_chainsaw/chainsaw_attack.wav”)
resource.AddFile(“sound/weapons/arch_chainsaw/chainsaw_die_01.wav”)
resource.AddFile(“sound/weapons/arch_chainsaw/chainsaw_idle.wav”)
resource.AddFile(“sound/weapons/arch_chainsaw/chainsaw_start_01.wav”)
resource.AddFile(“sound/weapons/arch_chainsaw/chainsaw_start_02.wav”)
— End Chainsaw

— MP-412 REX
resource.AddFile(“sound/weapons/mp412/shoot.wav”)
resource.AddFile(“particles/lee_particle.pcf”)
resource.AddFile(“particles/muzzle_smoke.pcf”)
resource.AddFile(“particles/particles_manifest.txt”)
resource.AddFile(“models/weapons/v_pist_mp412n.mdl”)
resource.AddFile(“models/weapons/w_pist_mp412n.mdl”)
resource.AddFile(“materials/trails/smoke.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Diffuse.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Arms/sleeve.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Arms/t_phoenix.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Barrel/GemtechSilencer.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Barrel/KACSilencer.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Barrel/MatchSuppressor.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Bottom/Bipod.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Bottom/FlashLight.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Side/ANPEQ2.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Sights/Ironsight/Battlesight.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Sights/Ironsight/SCARSight.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Sights/RDS/Aimpoint.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Sights/RDS/AimpointLense.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Sights/RDS/Docter.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Sights/RDS/DocterLense.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Sights/RDS/Eotech.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Sights/RDS/Kobra.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Sights/RDS/RedDot.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Sights/RDS/Trijiflex.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Sights/Scope/Acog.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Sights/Scope/AcogLense.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Sights/Scope/M145.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Sights/Scope/M145Lense.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Sights/Scope/RifleScope.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Sights/Scope/RifleScopeLense.vmt”)
resource.AddFile(“materials/models/weapons/v_models/mp412/Sights/Scope/Trilux.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Diffuse.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Arms/sleeve.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Arms/t_phoenix.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Barrel/GemtechSilencer.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Barrel/KACSilencer.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Barrel/MatchSuppressor.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Bottom/Bipod.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Bottom/FlashLight.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Side/ANPEQ2.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Sights/Ironsight/Battlesight.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Sights/Ironsight/SCARSight.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Sights/RDS/Aimpoint.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Sights/RDS/AimpointLense.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Sights/RDS/Docter.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Sights/RDS/DocterLense.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Sights/RDS/Eotech.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Sights/RDS/Kobra.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Sights/RDS/RedDot.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Sights/RDS/Trijiflex.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Sights/Scope/Acog.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Sights/Scope/AcogLense.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Sights/Scope/M145.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Sights/Scope/M145Lense.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Sights/Scope/RifleScope.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Sights/Scope/RifleScopeLense.vmt”)
resource.AddFile(“materials/models/weapons/w_models/mp412/Sights/Scope/Trilux.vmt”)
— End MP-412 REX

— M16A4
resource.AddFile(“particles/muzzles_universal.pcf”)
resource.AddFile(“models/weapons/v_rif_m16a3.mdl”)
resource.AddFile(“models/weapons/v_rif_m16a4.mdl”)
resource.AddFile(“models/weapons/w_rif_m16a3.mdl”)
resource.AddFile(“models/weapons/w_rif_m16a4.mdl”)
resource.AddFile(“sound/weapons/twink_m16a4/m16a4-1.wav”)
resource.AddFile(“materials/models/weapons/v_models/twink_m16a4/ar15carryhandlemount.vmt”)
resource.AddFile(“materials/models/weapons/v_models/twink_m16a4/barrel.vmt”)
resource.AddFile(“materials/models/weapons/v_models/twink_m16a4/carry.vmt”)
resource.AddFile(“materials/models/weapons/v_models/twink_m16a4/doctor_frame.vmt”)
resource.AddFile(“materials/models/weapons/v_models/twink_m16a4/doctor_lense.vmt”)
resource.AddFile(“materials/models/weapons/v_models/twink_m16a4/glass.vmt”)
resource.AddFile(“materials/models/weapons/v_models/twink_m16a4/grip.vmt”)
resource.AddFile(“materials/models/weapons/v_models/twink_m16a4/lower.vmt”)
resource.AddFile(“materials/models/weapons/v_models/twink_m16a4/lowercqc.vmt”)
resource.AddFile(“materials/models/weapons/v_models/twink_m16a4/mag.vmt”)
resource.AddFile(“materials/models/weapons/v_models/twink_m16a4/magcqc.vmt”)
resource.AddFile(“materials/models/weapons/v_models/twink_m16a4/plate_left.vmt”)
resource.AddFile(“materials/models/weapons/v_models/twink_m16a4/plate_right.vmt”)
resource.AddFile(“materials/models/weapons/v_models/twink_m16a4/ras.vmt”)
resource.AddFile(“materials/models/weapons/v_models/twink_m16a4/stock.vmt”)
resource.AddFile(“materials/models/weapons/v_models/twink_m16a4/upper.vmt”)
resource.AddFile(“materials/models/weapons/v_models/twink_m16a4/uppercqc.vmt”)
resource.AddFile(“materials/models/weapons/w_models/twink_m16a4/ar15carryhandlemount.vmt”)
resource.AddFile(“materials/models/weapons/w_models/twink_m16a4/barrel.vmt”)
resource.AddFile(“materials/models/weapons/w_models/twink_m16a4/carry.vmt”)
resource.AddFile(“materials/models/weapons/w_models/twink_m16a4/doctor_frame.vmt”)
resource.AddFile(“materials/models/weapons/w_models/twink_m16a4/doctor_lense.vmt”)
resource.AddFile(“materials/models/weapons/w_models/twink_m16a4/glass.vmt”)
resource.AddFile(“materials/models/weapons/w_models/twink_m16a4/grip.vmt”)
resource.AddFile(“materials/models/weapons/w_models/twink_m16a4/lower.vmt”)
resource.AddFile(“materials/models/weapons/w_models/twink_m16a4/mag.vmt”)
resource.AddFile(“materials/models/weapons/w_models/twink_m16a4/plate_left.vmt”)
resource.AddFile(“materials/models/weapons/w_models/twink_m16a4/plate_right.vmt”)
resource.AddFile(“materials/models/weapons/w_models/twink_m16a4/ras.vmt”)
resource.AddFile(“materials/models/weapons/w_models/twink_m16a4/stock.vmt”)
resource.AddFile(“materials/models/weapons/w_models/twink_m16a4/upper.vmt”)
— End M16A4

— End Custom weapons

— End File

I’m completely aware that you can do that, but I prefer my script as it is recursive and easily does that except I don’t need to do…well that.
I think it might be a problem with DurgzMod because this has happened before.

If it is an addon, it should automatically download all the files, if not, something is wrong with it, make sure your cfg has this exactly:
sv_allowupload 1
sv_allowdownload 1
sv_downloadurl “http://yourwebsite.here/garrysmod
Make sure your sv_downloadurl doesn’t have a / after garry’s mod.
Otherwise, I would just use resource.AddFile.

In my cfg I have
sv_downloadurl “myurl” – I actually have my url there that is working
I don’t think I need sv_allowupload 1 and sv_allowdownload 1
My sv_downloadurl is working fine.
My FastDL is XenonServers’s fast DL, it’s a little weird.
My FastDL works on every other thing (like fire arms) it’s just for DurgzMod.
I’m pretty sure it’s just DurgzMod.

[editline]6th December 2012[/editline]

Oh crap, now come to think of it I did not do the thing for durgz mod that I need to for everything else (extract every materials and models folder from addons into the root dir)
This should fix it, if not i’ll check back.

The only thing i have left to say is, find a svn link and get a newer version…?

DurgzMod is outdated, so i’m using a fixed version of it.
I think I know how to fix it though now.

Good luck to you sir, last resort is resource.AddFile.

Once again…that’s not my problem.
My script works fine.

This is bullshit.


-->> Resource manager
--------------------------------------------------------->>


--> Init & variables
--------------------------------------------------------->>
	cr = {}

	cr.files = {}
	cr.folders = {}

	cr.path = GM.Folder .. "/content/"


--> Functions
--------------------------------------------------------->>
	function cr:parser( dir, data )

		for index, item in pairs( data ) do if file.IsDir( dir .. item, "GAME" ) then if ( item != "maps" ) then table.insert( self.folders, dir .. item .. "/" ) end else table.insert( self.files, { item = string.gsub( dir .. item, self.path, "" ), path = dir .. item, size = file.Size( dir .. item, "GAME" ) } ) end end

	end

	function cr:generator()

		local files, folders = file.Find( self.path .. "*", "GAME" )

		self:parser( self.path, files )
		self:parser( self.path, folders )


		for index, folder in pairs( self.folders ) do

			local files, folders = file.Find( folder .. "*", "GAME" )

			self:parser( folder, files )
			self:parser( folder, folders )

		end

		for index, data in pairs( self.files ) do resource.AddFile( data.item ) end

		self:pack()

	end

Also, you can’t add files to the download list that are inside of addons or gamemode content folders. Just add the files without the addon or gamemode path. If you have mygamemode/content/sound/mysound.wav then you should do

resource.AddFile(“mysound.wav”)
not
resource.AddFile(“gamemodes/mygamemode/content/sound/mysound.wav”)

When you install an addon or activate a gamemode, that content is mounted in to gmod. It exists inside the base directory as far as the game is concerned.