Garry's Mod Wiki

Garry's Mod Wiki

  string ConVar:GetString()

Description

Returns the current ConVar value as a string.

Returns

1 string
The current console variable value as a string.

Example

Will check if the gamemode is sandbox (Consider using engine.ActiveGamemode)

if GetConVar("gamemode"):GetString() == "sandbox" then print("Gamemode is sandbox") end
Output: Gamemode is sandbox

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 four times a day. Edits and history are not available.

Last Parsed: Loading...