UpdateServerSettings
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!