CreateConVar

From Garry's Mod
Jump to: navigation, search
 CreateConVar( )

Contents

Description

Creates a console variable (ConVar), in general these are for things like gamemode/server settings.

Arguments

string name

Name of the convar.

This cannot be a name of an engine console command or console variable. It will silently fail if it is. If it is the same name as another lua ConVar, it will return that ConVar object.

Arguments

string value

Default value of the convar. Can also be a number.

Arguments

number flags=FCVAR_NONE

Flags of the convar, see FCVAR_ Enums, either as bitflag or as table.

Arguments

string helptext=""

The help text to show in the console.

Returns

ConVar

The convar created.
Personal tools
Navigation