Download map materials only when going to map

Instead of having all the materials and crap download for some maps that dont have them packed in the bsp what would I put in my resource file to have them download only when you got to the specific map that needs them downloaded?

would it be something like:

if curMap = game.GetMap() == (“mapname.bsp” ) then
resource.AddFile( “materials/blahblahblah.vmt” )


Use this to combine textures/models with the .bsp file:

It’s tiresome when map makers have custom materials as seperate files.

ohh thank you!