setConvar
Client
Sets a convar on this client only. It is never sent to the server. With persist, the value is kept for this server and comes back in the next session.
Also exists on the server, with its own implementation: setConvar
bool setConvar(string name, string value [, bool persist = false])
Parameters
| Name | Type | Description |
|---|---|---|
| name | string | The convar's name. |
| value | string | The value. |
| persist | bool | Keep the value for the next sessions on this server.default false |
Returns
true if it was set, false while there is no session with a server. Raises an error if the server syncs that convar.
Example
setConvar("hud_scale", "1.2", true)NoteWhat was kept with
persist is lost when the server changes its content.key.