Call of Duty 7: Unlimited Dvars Trick

From COD Modding & Mapping Wiki
Share/Save/Bookmark
Jump to: navigation, search
Nutshell.png
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
    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.cfg
  • 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.

From ignomo - Sources Article


--Zeroy 12:30, 13 September 2011 (IST)