# ConVars

### Execute

> :information\_source: Force full-update
>
> :information\_source: Turn up player footstep volume

```lua
-- Initialize the cvar objects
local cl_fullupdate = cvar.cl_fullupdate
local snd_setmixer = cvar.snd_setmixer

-- Invoke the callback
cl_fullupdate:call()

-- Adjust players’ step volume by setting the mixer volume to 1.2
snd_setmixer:call('GlobalFootsteps', 'vol', 1.2)
```

### Getting / Setting values

> :information\_source: Override maximum fake-lag limit

```lua
-- Initialize the cvar objects
local process_ticks = cvar.sv_maxusrcmdprocessticks

-- [60]: New value | [true]: Sets the raw value
process_ticks:int(60, true)
```

### Callbacks

> :information\_source: Instantly crash the server if someones changes the <mark style="color:yellow;">`sv_cheats`</mark> cvar to 1
>
> :information\_source: Refuse the connection to the server if the IP is blacklisted

```lua
cvar.sv_cheats:set_callback(function(cvar_obj, old_value, new_value)
    if tonumber(old_value) == 0 and tonumber(new_value) == 1 then
        -- invoke ent_create convar callback with "weapon_ak47" argument
        -- cvar.ent_create:call 'weapon_ak47'

        cvar.clear:call()
        print '\aFF697Asv_cheats was updated. Crashing the server.'

        utils.console_exec 'ent_create weapon_ak47'
    end
end)

cvar.connect:set_callback(function(cvar_obj, args)
    if args[1] == '127.0.0.1' then
        return false
    end
end)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-csgo.neverlose.cc/useful-information/script-examples/convars.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
