Garry's Mod Wiki

UpdateMapList

  UpdateMapList()

Description

This is used internally - although you're able to use it you probably shouldn't. Called from JS when starting a new game

This function updates the Map List

Example

Manually updating the Map List with one Category.

-- local mapList = { ["Example"] = {"gm_flatgrass", "gm_construct"} } pnlMainMenu:Call( "UpdateMaps(" .. util.TableToJSON(mapList) .. ")" )
Output:

Example

Manually updating the Map List with an extra Category.

-- local mapList = GetMapList() mapList["Example"] = {"gm_flatgrass", "gm_construct"} pnlMainMenu:Call( "UpdateMaps(" .. util.TableToJSON(mapList) .. ")" )
Output: