convar_t

local function on_paint() 
    local skyname = cvars.sv_skyname
    print(skyname:get_string())
end

callbacks.add(e_callbacks.PAINT, on_paint)

Functions

get_int

retrieves the int value of the convar

int get_int()

Example

print(cvars.viewmodel_fov:get_int())

get_float

retrieves the float value of the convar

float get_float()

Example

print(cvars.cl_crosshairsize:get_float())

get_string

retrieves the string value of the convar

string get_string()

Example

print(cvars.sv_skyname:get_string())

set_int

sets the int value of the convar

void set_int(<int> value)

Example

cvars.viewmodel_fov:set_int(60)

set_float

sets the float value of the convar

void set_float(<float> value)

Example

cvars.cl_crosshairsize:set_float(2.5)

set_string

sets the string value of the convar

void set_string(<string> value)

Example

cvars.sv_skyname:set_string("bing_bong_city")

Last updated