This method will allow modders to give admins more than 256 dvars and admins a way to set all the dvars from a config file.
Put in a config: dvartrick.cfg
Add dvartrick.cfg to the mod fastfile:
rawfile,dvartrick.cfg
When the dedicated server starts, execute the config:
/exec dvartrick.cfg
This will:
- Whitelist 'set' if it's a dedicated server
- Execute server.cg
- Blacklist 'set'
In server.cfg admins can set any number of dvars using 'set dvarname [value]'
Notes:
- The if keyword is followed by a space and the predicate is between brackets. The whole statement is in one line.
- The dvar ui_animspeedscale does not exist in dedicated servers, so the predicate is true. The dvar is client side and can not be set to zero. This prevents clients from using this method to whitelist their own dvars.
Tutorial originally written by ignomo
Source: codhq
Put in a config: dvartrick.cfg
Code:
if ( dvarfloat( ui_animSpeedScale ) == 0 ) setmoddvar set
exec server.cfg
setmoddvar set -remove
Add dvartrick.cfg to the mod fastfile:
rawfile,dvartrick.cfg
When the dedicated server starts, execute the config:
/exec dvartrick.cfg
This will:
- Whitelist 'set' if it's a dedicated server
- Execute server.cg
- Blacklist 'set'
In server.cfg admins can set any number of dvars using 'set dvarname [value]'
Notes:
- The if keyword is followed by a space and the predicate is between brackets. The whole statement is in one line.
- The dvar ui_animspeedscale does not exist in dedicated servers, so the predicate is true. The dvar is client side and can not be set to zero. This prevents clients from using this method to whitelist their own dvars.
Tutorial originally written by ignomo
Source: codhq