PDA

View Full Version : Unlimited Dvars Trick: Working Around the Whitelist Limit



Tally
July 22nd, 2011, 06:23
I found this over at CODHQ:


"ignomo" has wrote :

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




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.





http://www.callofduty.com/board/viewtopic.php?f=113&t=532857&sid=nacn23161uv4jl4d3hm2beanc0

It works. I've tested it. It's a brillent idea. Just what we've been looking for. Well done ignomo!

CaptCom
July 22nd, 2011, 08:16
Very useful http://www.codutility.com/images/icones/number-one-45.gif Good find http://www.codutility.com/images/icones/smile.gif

Tally
July 22nd, 2011, 08:33
Not useful - essential! I ran out of whitelised dvars with just one module of the mod I'm working on. And I practically gave up with modding for BO as it is such a hand-cuffed modding system that its a nightmare to work with, and having also run out of dvars to allow admins to turn stuff on or off, I thought I'd just pass and let modding for BO pass me by. Now, with this work-around, it has inspired me to go on and complete my mod.

MelVin
July 26th, 2011, 02:15
This is awesome. great find m8http://www.codutility.com/images/icones/number-one-45.gifhttp://www.codutility.com/images/icones/bravo.gifhttp://www.codutility.com/images/icones/bravo.gif