Skip to content

cvar

get_int

get_int() -> number

Returns integer value of the convar.

Usage

local r_drawothermodels = cvar.r_drawothermodels;
print(r_drawothermodels:get_int());

set_int

set_int(val: number)

Sets integer value for the convar.

Parameters

Name Type Description
val number Value

Usage

local r_drawothermodels = cvar.r_drawothermodels;
r_drawothermodels:set_int(2);

get_float

get_float() -> number

Returns float value of the convar.

Usage

local r_aspectratio = cvar.r_aspectratio;
print(r_aspectratio:get_float());

set_float

set_float(val: number)

Sets float value for the convar.

Parameters

Name Type Description
val float Value

Usage

local r_aspectratio = cvar.r_aspectratio;
r_aspectratio:set_float(1.01);

get_string

get_string() -> string

Returns string value of the convar.

Usage

local sv_skyname = cvar.sv_skyname;
print(sv_skyname:get_string());

set_string

set_string(val: string)

Sets string value for the convar.

Parameters

Name Type Description
val string Value

Usage

local sv_skyname = cvar.sv_skyname;
sv_skyname:set_string('csgo_night02b');