> For the complete documentation index, see [llms.txt](https://lua.legacy.fatality.win/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lua.legacy.fatality.win/csgo/datatypes/cvar.md).

# Cvar

csgo.cvar

Convar data type. See [cvar:find\_var](/csgo/interfaces/cvar.md#find_var)

## Functions

### get\_int

returns the convar value as an integer

`get_int( )`

### get\_float

returns the convar value as a float

`get_float( )`

### set\_int

sets the convar value as an integer

`set_int( value )`

| Parameter | Data type |         Description        |
| :-------: | :-------: | :------------------------: |
|   value   |  integer  | value to set the convar to |

### set\_float

sets the convar value as a float

`set_float( value )`

| Parameter | Data type |         Description        |
| :-------: | :-------: | :------------------------: |
|   value   |   float   | value to set the convar to |

### set\_string

sets the convar value as a string

`set_string( value )`

| Parameter | Data type |         Description        |
| :-------: | :-------: | :------------------------: |
|   value   |   string  | value to set the convar to |

### set\_color

sets the convar value as a [csgo.color](/csgo/datatypes/color.md)

`set_float( value )`

| Parameter |                Data type               |         Description        |
| :-------: | :------------------------------------: | :------------------------: |
|   value   | [csgo.color](/csgo/datatypes/color.md) | value to set the convar to |

### unlock

allows use of sv\_cheat protected convars

`unlock( )`
