Garry's Mod Wiki

ConVar:GetString

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

Page Links


Special Pages


Wikis

?

Render Time: 66ms

DB GetPage 30
Generate Html 10
SaveChanges (1) 11
Render Body 0
Render Sidebar 12