Silent Forcing Client Settings: Difference between revisions

From MyGamingTalk
Jump to navigation Jump to search
 
Line 17: Line 17:
= sv_cvar =
= sv_cvar =


The sv_cvar command is a more flexible method for forcing client cvars. As well as matching equal values, it supports value ranges and string checks. The command is constructed with at least 2 parameters. The following lists all supported options. Note that for all the first level argumets, there are both short and long form that can be used equally.
The sv_cvar command is a more flexible method for forcing client cvars. As well as matching equal values, it supports value ranges and string checks. The command is constructed with at least 2 parameters. The following lists all supported parameters. Note that for all the first level argumets, there are both short and long form that can be used equally.


== EQ / EQUAL ==
== EQ / EQUAL ==

Latest revision as of 23:08, 18 September 2014

Description

silEnT server is able to force client cvars to certain values or ranges by using forcecvar and sv_cvar commands. sv_cvarempty will clear all the sv_cvar commands the server has loaded.

To use the possibility, the g_mapConfigs cvar must be set. All forcecvar and sv_cvar commands are placed in the mapconfig files. The default.cfg, will be executed on every map start. Those settings can be overloaded by using a map specific cfg ([mapname].cfg).

forcecvar

Forcecvar command can be used to force client cvars into a single value.

Example:

   forcecvar snaps 20

This forces the snaps cvar to 20 on all players.

sv_cvar

The sv_cvar command is a more flexible method for forcing client cvars. As well as matching equal values, it supports value ranges and string checks. The command is constructed with at least 2 parameters. The following lists all supported parameters. Note that for all the first level argumets, there are both short and long form that can be used equally.

EQ / EQUAL

Matches the exact value for the cvar.

Example:

   sv_cvar EQ 20

This is equal to "forcecvar snaps 20", except that the value is checked on each frame instead of making it a read only value.

G / GREATER

The cvar value must be greater than.

Example:

   sv_cvar G snaps 20

This forces the snap value to be at least 21. If the original client value is smaller than 21, it is set automatically to 21. Otherwise nothing is done to it.

GE / GREATEREQUAL

The cvar value must be greater than or equal.

Example:

   sv_cvar GE snaps 20

This forces the snaps value to be 20 or greater. If the original client value is smaller than 20, it is set automatically to 20. Otherwise nothing is done to it.

L / LOWER

The cvar value must be smaller than.

Example:

   sv_cvar L snaps 20

This forces the snaps to be 19 or smaller. If the original client value is 20 or bigger, it is set to 19. Otherwise nothing is done to it.

LE / LOWEREQUAL

The cvar value must be smaller than or equal.

Example:

   sv_cvar LE snaps 20

This forces the snaps to be 20 or smaller. If the original client value is 21 or bigger, it is set to 20. Otherwise nothing is done to it.

IN / INSIDE

The cvar is forced to be inside given range of values.

Example:

   sv_cvar cg_fov IN 90 120

This forces the cg_fov value to inside the (90,120) range. If the original cg_fov is lower than 90, it is set to 90. If it is higher than 120, it is set to 120. Otherwise nothing is done to it.

INC / INCLUDE

The cvar as a string must contain the given substring.

Example:

   sv_cvar mystr "test" "withtest"

If the mystr cvar does not contain "test" anywhere in it, the "withtest" string is set to be the mystr value.

EXC / EXCLUDE

The cvar as a string must exclude the given substring.

Example:

   sv_cvar mystr "test" "without"

If the mystr cvar includes the string "test", the "without" is set to be the mystr value.