CreateClientConVar

From Garry's Mod
Revision as of 12:51, 27 January 2015 by Robotboy655 (Talk | contribs)
Jump to: navigation, search
 CreateClientConVar( )

Contents

Description

Makes a clientside-only console variable

Arguments

string name

Name of the ConVar to be created and able to be accessed.

This cannot be a name of existing console command or console variable. It will silently fail if it is.

Arguments

number default

Default value of the ConVar.

Arguments

boolean shouldsave=true

Should the ConVar be saved across sessions

Arguments

boolean userdata=false

Should the ConVar and its containing data be sent to the server when it has changed. This make the convar accessible from server using Player:GetInfoNum and similar functions.

Returns

ConVar

Created convar.

Examples

Example

Creates a ConVar that does nothing and saves.

CreateClientConVar("superspeed_enabled", "0", true, false)


Personal tools
Navigation