Quote:
Originally Posted by morxxx
is there plugin to read some cvar ? like updaterate ? etc.
greets
|
For the record, I'm not a big fan of this sort of thing.
Yet, take a look at EventScripts for CSS, I strongly suspect it can do what you want. The ES plugin basically just lets you run a .cfg file for any event triggered by the server (e.g. round_end, player_death, etc). Combine it with a popular admin mod that has cexec (e.g. Mani's ma_cexec) and you can refresh these settings to what you desire for the clients.
Some people just refresh it at every round_start or on player_spawn, etc. With EventScripts + Mani, you could do this:
round_start.cfg
Code:
ma_cexec_all cl_updaterate 20
EventScripts also has a lot of its own built-in commands to make scripting better (these are just new console commands). One newly-added command allows you to read client variables that deal with networking. As such, you could also do something like this:
player_spawn.cfg
Code:
setinfo playersvalue 0
// looks up the player's "cl_updaterate" and stores it in the server's variable "playersvalue" that we created above
es_getclientvar playersvalue event_var(userid) cl_updaterate
// now we test whether our variable is within a certain range and correct if not
if (server_var(playersvalue) lessthan 16) then ma_cexec event_var(userid) cl_updaterate 20
if (server_var(playersvalue) greaterthan 25) then ma_cexec event_var(userid) cl_updaterate 20
Keep in mind that this does not stop people from spamming their cvars back into "bad" values, but it will catch the average Joe if they don't know to look for it.
These are just examples. If you wanted an even more detailed solution, you could go brainstorm with some of the expert scripters over in my EventScripts forums:
http://www.mattie.info/cs/forums/viewforum.php?f=9
-Mattie