Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --This is a list of your server's maps which are available through the workshop
- --Each one uses the map file's name and the workshop ID
- maplist = {}
- maplist["gm_trainconstruct2"] = "161015436"
- maplist["gm_freespace_13"] = "115510325"
- maplist["gm_citylimits_day_v1"] = "106750883"
- maplist["gm_citylimits_v2"] = "104674256"
- maplist["gm_bluehills_test3"] = "243902601"
- maplist["gm_excess_islands"] = "115250988"
- maplist["gm_bigcity"] = "105982362"
- maplist["gm_fork"] = "326332456"
- maplist["gm_Lair"] = "104488112"
- --------------------------------------------------
- local map = game.GetMap() -- Get's the current map name
- local workshopid = maplist[map]
- -- Finds the workshop ID for the current map name from the table above
- if( workshopid != nil )then
- --If the map is in the table above, add it through workshop
- print( "[WORKSHOP] Setting up maps. " ..map.. " workshop ID: " ..workshopid )
- resource.AddWorkshop( workshopid )
- else
- --If not, ) then hope the server has FastDL or the client has the map
- print( "[WORKSHOP] Not available for current map. Using FastDL instead hopefully..." )
- end
Advertisement
Add Comment
Please, Sign In to add comment