getConvar
Shared
Reads a convar as text. On a client, a convar the server syncs comes before the client's own.
string|any getConvar(string name [, any default = false])
Parameters
| Name | Type | Description |
|---|---|---|
| name | string | The convar's name. |
| default | any | What to return when the convar does not exist or is empty.default false |
Returns
The convar's value. If it does not exist or is empty, default.
Example
local mode = getConvar("gamemode", "freeroam")