SetConVarInt Function

Sets the integer value of a console variable.

Note: The replicate and notify params are only relevant for the original, Dark Messiah, and Episode 1 engines. Newer engines automatically do these things when the convar value is changed.

void SetConVarInt(Handle convar, int value, bool replicate, bool notify)

Parameters

Handle convar

Handle to the convar.

int value

New integer value.

bool replicate

If set to true, the new convar value will be set on all clients. This will only work if the convar has the FCVAR_REPLICATED flag and actually exists on clients.

bool notify

If set to true, clients will be notified that the convar has changed. This will only work if the convar has the FCVAR_NOTIFY flag.

Errors

Invalid or corrupt Handle.