GetConVarString
Description
Returns the string value ConVar with the specified name.
This function will return an empty string if the ConVar does not exist. Use cvars.String to specify your own default.
Will return the value of game.MaxPlayers (as a string) 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 for that case.
In performance intensive places such as think and rendering callbacks/hooks, it is advised to use ConVar:GetString on a ConVar object directly, which be retrieved via GetConVar, or from existing CreateConVar call.
Arguments
Returns
Page views: 19,382
Updated: Three Days Ago
Updated: Three Days Ago
Garry's Mod
Rust
Steamworks
Wiki Help