resource.AddFile

So ive been noticing when someone comes to my server all the maps get downoaded at once but when ive went into some other servers it only downloads the current map the server is on. Is their something in my forcedownload.lua file i can add so that not ever map gets downloaded at once?

[lua]
if (SERVER) then
resource.AddFile(“sound/hunters/9.mp3”)
resource.AddFile(“sound/hunters/10.mp3”)
resource.AddFile(“sound/hunters/11.mp3”)
resource.AddFile(“sound/hunters/12.mp3”)
resource.AddFile(“sound/hunters/13.mp3”)
resource.AddFile(“sound/hunters/14.mp3”)
resource.AddFile(“sound/hunters/17.mp3”)
resource.AddFile(“sound/hunters/gotchabitch.mp3”)
resource.AddFile(“sound/hunters/pulpfiction.mp3”)
resource.AddFile(“sound/props/18.mp3”)
resource.AddFile(“sound/props/20.mp3”)
resource.AddFile(“sound/props/26.mp3”)
resource.AddFile(“sound/props/60.mp3”)
resource.AddFile(“sound/props/71.mp3”)
resource.AddFile(“sound/props/ACDC.mp3”)
resource.AddFile(“sound/props/Get Hyper.mp3”)
resource.AddFile( “models/amnesia/servantgrunt.mdl” )
resource.AddFile( “models/amnesia/servantgrunt.dx90.vtx” )
resource.AddFile( “models/amnesia/servantgrunt.dx80.vtx” )
resource.AddFile( “models/amnesia/servantgrunt.phy” )
resource.AddFile( “models/amnesia/servantgrunt.sw.vtx” )
resource.AddFile( “models/amnesia/servantgrunt.vvd” )
resource.AddFile( “materials/models/amnesia/servantgrunt/servant_grunt.vmt” )
resource.AddFile( “materials/models/amnesia/servantgrunt/servant_grunt.vtf” )
resource.AddFile( “materials/models/amnesia/servantgrunt/servant_grunt_hair.vmt” )
resource.AddFile( “materials/models/amnesia/servantgrunt/servant_grunt_hair.vtf” )
resource.AddFile( “materials/models/amnesia/servantgrunt/servant_grunt_hair_nrm.vtf” )
resource.AddFile( “materials/models/amnesia/servantgrunt/servant_grunt_nrm.vtf” )
resource.AddFile( “maps/ph_abandoned_hotel.bsp” )
resource.AddFile( “maps/ph_abandoned_office.bsp” )
resource.AddFile( “maps/ph_downbroke.bsp” )
resource.AddFile( “maps/ph_island_limited.bsp” )
resource.AddFile( “maps/ph_lockup.bsp” )
resource.AddFile( “maps/ph_motel_blacke_redux_fin.bsp” )
resource.AddFile( “maps/ph_motel_blacke_v3.bsp” )
resource.AddFile( “maps/ph_office.bsp” )
resource.AddFile( “maps/ph_pirateship.bsp” )
resource.AddFile( “maps/ph_restaurant.bsp” )
resource.AddFile( “maps/ph_school.bsp” )
resource.AddFile( “maps/ph_story3.bsp” )
resource.AddFile( “maps/ph_underwataaa.bsp” )
resource.AddFile( “maps/ph_wolfsmanor.bsp” )
resource.AddFile( “maps/ph_zombie_bunker.bsp” )
end
[/lua]

Yeah; you’re resource.AddFiling maps. You don’t have to.

so your saying to take out all the resource.AddFile for the maps?

oh god i hate when people addfile all the maps in the server

yes

i didnt know that, thank you so much for your help guys.

Completely remove the following



resource.AddFile( "maps/ph_abandoned_hotel.bsp" )
resource.AddFile( "maps/ph_abandoned_office.bsp" )
resource.AddFile( "maps/ph_downbroke.bsp" )
resource.AddFile( "maps/ph_island_limited.bsp" )
resource.AddFile( "maps/ph_lockup.bsp" )
resource.AddFile( "maps/ph_motel_blacke_redux_fin.bsp" )
resource.AddFile( "maps/ph_motel_blacke_v3.bsp" )
resource.AddFile( "maps/ph_office.bsp" )
resource.AddFile( "maps/ph_pirateship.bsp" )
resource.AddFile( "maps/ph_restaurant.bsp" )
resource.AddFile( "maps/ph_school.bsp" )
resource.AddFile( "maps/ph_story3.bsp" )
resource.AddFile( "maps/ph_underwataaa.bsp" )
resource.AddFile( "maps/ph_wolfsmanor.bsp" )
resource.AddFile( "maps/ph_zombie_bunker.bsp" )


Since this is pretty much forcing the players to download these maps

Unless you want to force your players to download a certain map, you don’t need to resource.AddFile a map, since the server automatically makes the client who’s joining downloading the current set map, of course insinuating that it has been web synced.

I have another question when i join my server it trys to download my other addons even though i dont have it on my web host or in my forcedownloads.lua how come it does that?