M MY Multiplayer: Wiki
Side
Kind

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

NameTypeDescription
namestringThe convar's name.
defaultanyWhat 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")

See also