Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
More then 256 whitelisted dvars
#1
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.

Tutorial originally written by ignomo
Source: codhq
[Image: MaEIQ.png]
Reply

#2
(08-04-2011, 18:15)Pozzuh 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.

Source: codhq

When re-posting someone else's findings/work, always mention their name explicitly. Otherwise, people will unwittingly give you credit for it. It isn't good enough in my view to simply mention the source in the small print at the foot of a post.

As it is this finding was made by ignomo.
Reply

#3
I found this posted on the openwarfare mod site. There was no name included, so I didn't know who made it.
( http://openwarfaremod.com/owforum/viewto...=96&t=5432 )

Normally I'd have included the makers name, as I did in the menu file reference I posted.
[Image: MaEIQ.png]
Reply

#4
(08-15-2011, 15:35)Pozzuh Wrote: I found this posted on the openwarfare mod site. There was no name included, so I didn't know who made it.
( http://openwarfaremod.com/owforum/viewto...=96&t=5432 )

Normally I'd have included the makers name, as I did in the menu file reference I posted.

Pozzuh Wrote:There was no name included

Actually, there was. If you look again, I quoted ignomo verbatim, and I also finished my post by saying:

Tally Wrote:Well done ignomo!

http://openwarfaremod.com/owforum/viewto...=96&t=5432

My point was it avoids all sorts of misunderstandings and hurt feelings if you are clear about your sources.
Reply

#5
I didn't see that. And as you can see I already edited my post.

Stop hating please.
[Image: MaEIQ.png]
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help dedicated servers and custom dvars mattyman 0 2,516 06-22-2013, 07:33
Last Post: mattyman
Brick Help Dvars Plugin Help.. XxBRxX 2 2,778 12-09-2012, 01:48
Last Post: XxBRxX
  Ripped Black Ops II dvars tadej 6 7,124 11-28-2012, 21:22
Last Post: kokole
  [Request] promod dvars raminr63 0 2,519 10-17-2012, 17:02
Last Post: raminr63
Question Help what dvars can be used and working, in forceclientdvars? founderlj 1 2,251 08-20-2012, 08:21
Last Post: d0h!
  help Dvars alegrete 2 2,430 04-24-2012, 15:06
Last Post: alegrete
  Help A hud element that's depending on dvars JariZ 2 2,681 03-20-2012, 10:11
Last Post: JariZ
  Dvars list MW3 greeen 7 9,962 12-14-2011, 01:56
Last Post: jaykay
  DVARS Don't Work On My Server obliviron 17 9,069 12-03-2011, 20:06
Last Post: obliviron
  [Request] killstreak's dvars? SeLeR 8 3,964 11-27-2011, 16:23
Last Post: iAegle

Forum Jump:


Users browsing this thread:
2 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.