Adding Convars to the Multiplayer Advanced Tab
(Redirected from Adding convars to the multiplayer advanced tab)
This page discusses how to add your own convars to the 'Advanced' section in the Multiplayer tab of the Options menu.
By default there should be nothing in this tab for your mod. To add convars to it create a user_default.scr
file and place it in the cfg
folder inside your mod folder.
Or just edit the "settings.scr", also in the cfg folder. That file comes with the mod
Add the following inside it:
// NOTE: THIS FILE IS AUTOMATICALLY REGENERATED, //DO NOT EDIT THIS HEADER, YOUR COMMENTS WILL BE LOST IF YOU DO // User options script // // Format: // Version [float] // Options description followed by // Options defaults // // Option description syntax: // // "cvar" { "Prompt" { type [ type info ] } { default } } // // type = // BOOL (a yes/no toggle) // STRING // NUMBER // LIST // // type info: // BOOL no type info // NUMBER min max range, use -1 -1 for no limits // STRING no type info // LIST delimited list of options value pairs // // // default depends on type // BOOL is "0" or "1" // NUMBER is "value" // STRING is "value" // LIST is "index", where index "0" is the first element of the list // Half-Life User Info Configuration Layout Script (stores last settings chosen, too) // File generated: Tue May 26 04:33:22 AM // // // Cvar - Setting VERSION 1.0 DESCRIPTION INFO_OPTIONS { "r_drawviewmodel" //the convar { "Draw the viewmodel" //the description { BOOL } //the type of convar { "1" } //the boolean value } "viewmodel_fov" //the convar { "Adjust the field of view" //the description { SLIDER 54 70 } //the type of convar { "1" } //the boolean value } }
There's 2 example convars in there. One is a 'slider' and one a boolean. It's self explanatory how to add your own.