Skip to content

cvars

Getting convars

You can do this by cvars.CONVAR_NAME

1
2
3
4
5
6
local MAX_RATE = 786432

if cvars.rate:get_int() ~= MAX_RATE then
    print("Bad config!", color_t.new(1, 0, 0, 1))
    cvars.rate:set_int(MAX_RATE) 
end
Return type is convar_t