Garry's Mod Wiki

Garry's Mod Wiki

  UpdateServerSettings()

Description

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

Updates the Server Settings when called.

Example

Updating the Server Setting manually

if !pnlMainMenu then return end -- pnlMainMenu is the Main Menu panel. (https://github.com/Facepunch/garrysmod/blob/master/garrysmod/lua/menu//garrysmod/lua/menu/mainmenu.lua#L468) local settings = { hostname = "Example", sv_lan = 0, p2p_enabled = 1, } pnlMainMenu:Call( "UpdateServerSettings(" .. util.TableToJSON( settings ) .. ")" )
Output:
Only the given settings will be displayed and the gamemode settings will be hidden!

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...