How would I make it so the map only force downloads when we are on that map because right now I use the workshop to download maps and it downloads all the maps at once when someone joins and I dont want that. I already tried not doing add.Workshop but then it didnt download at all so if anyone could help that would be awesome.
It's resource.AddWorkshop. As for doing what you are asking for, try something like this:
[code]local maps = {
[ "ttt_whatever" ] = 123456, -- WorkshopID here
[ "ttt_whatever2" ] = 654321,
}
resource.AddWorkshop( maps[ game.GetMap() ] )[/code]
[QUOTE=code_gs;45410013]It's resource.AddWorkshop. As for doing what you are asking for, try something like this:
[code]local maps = {
[ "ttt_whatever" ] = 123456, -- WorkshopID here
[ "ttt_whatever2" ] = 654321,
}
resource.AddWorkshop( maps[ game.GetMap() ] )[/code][/QUOTE]
Would I add that to workshop.lua?
Run it serverside.
[QUOTE=code_gs;45410130]Run it serverside.[/QUOTE]
Where would I put it to do that?
lua/autorun/server/whatever.lua
Do I still keep them in the workshop.lua or do I remove them if I do that.
Remove it.
and it doesnt matter what I name the file? So it could be like lua/autorun/server/maps.lua???
it doesn't matter
Sure.
Sorry, you need to Log In to post a reply to this thread.