Skip to content

convar

Represents in-game console variable

Methods

get_float(): number

Returns float value

1
local aspectratio = cvars.find_var('r_aspectratio'):get_float()

set_float(value)

Type Name Description Default
number value Value to set none

Sets value to convar

1
cvars.find_var('r_aspectratio'):set_float(4/3)

get_int(): number

Returns int value

1
local othermodels = cvars.r_drawothermodels:get_int()

set_int(value)

Type Name Description Default
number value Value to set none

Sets value to convar

1
cvars.fps_max:set_int(0)