Need help with writing resource file correctly for FastDL

So I know that you can use pakrat to pack things that need to be included in a bsp but that doesn’t always seem to work for me.

If anyone can help me write something like below (but correct) that would be great!

if curMap = game.Getmap() <-Not sure how I would write the proper syntax to get the current map/map that is loading
resource.AddFile( "insert path to thing that needs to be downloaded)

Hope this makes sense…

What PakRat has to do with FastDL and resoucre.AddFile?

it doesn’t, re-read what i said.

Oh, I think I understand.



local curMap = game.GetMap()
if ( curMap == "gm_construct" ) then
   resource.AddFile("file")
elseif ( curMap == "gm_flatgrass" ) then
   resource.AddFile("file2")
end

I will try this out, thank you!