Silent Forcing Client Settings: Difference between revisions

From MyGamingTalk
Jump to navigation Jump to search
No edit summary
Line 3: Line 3:
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.
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 must be set. All forcecvar and sv_cvar commands that 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).
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 =

Revision as of 22:19, 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 options.

EQ

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

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

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

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

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

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

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

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.