Revision Difference
Global.GetConVarString#567652
<function name="GetConVarString" parent="Global" type="libraryfunc">
<description><deprecated>Store the <page>ConVar</page> object retrieved with <page>Global.GetConVar</page> or use <page>cvars.String</page>. </deprecated>Gets the string value ConVar with the specified name. Returns the value of <page>game.MaxPlayers</page> when maxplayers is specified as a convar.
<warning>Don't use this function to get the maximum number of players! Use <page>game.MaxPlayers</page> instead.</warning></description>⤶
<description><deprecated>Store the <page>ConVar</page> object retrieved with <page>Global.GetConVar</page> or use <page>cvars.String</page>. </deprecated>Gets the string value ConVar with the specified name.
⤶
Returns the value of <page>game.MaxPlayers</page> if `maxplayers` is specified as the convar name, even though `maxplayers` is not a convar. (it is a console **command**) You should be using aforementioned Lua function instead.⤶
</description>⤶
<realm>Shared and Menu</realm>
<file line="530-L534">lua/includes/util.lua</file>
<args>
<arg name="name" type="string">Name of the ConVar to get.</arg>
</args>
<rets>
<ret name="" type="string">The ConVar's value.</ret>
</rets>
</function>
Garry's Mod
Rust
Steamworks
Wiki Help