Garry's Mod Wiki

Garry's Mod Wiki

  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:

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...