Raised This Month: $51 Target: $400
 12% 

ability to force client commands from server


Post New Thread Reply   
 
Thread Tools Display Modes
morxxx
Junior Member
Join Date: Jan 2005
Old 06-24-2005 , 07:33  
Reply With Quote #11

is there plugin to read some cvar ? like updaterate ? etc.
greets
morxxx is offline
Mattie
Veteran Member
Join Date: Jan 2005
Old 06-24-2005 , 08:20  
Reply With Quote #12

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
Mattie is offline
DevilFingers
New Member
Join Date: Nov 2005
Old 11-01-2005 , 00:48  
Reply With Quote #13

Or you could make your own plugin where it sees when ::ClientSettingsChanged is called and if its the certain cvar then you reset it for them
__________________
Matthew Parlane
DevilFingers is offline
awuh0
Senior Member
Join Date: Apr 2005
Location: /dev/null
Old 11-01-2005 , 02:03  
Reply With Quote #14

yeah its allready part of eventscripts...
at least for the cvars that valve allows you to see the clients change. The event for matties eventscripts is, es_player_setting.

so in es_player_setting.cfg
you would have
es ma_cexec event_var(userid) cl_interpolate 0.01
ect...
__________________
~The_wUh
_________________
Ph34r teh zombies!!!
find a better way to play CSS, connect to...
thewuh.servebeer.com
thecircus.servebeer.com
awuh0 is offline
Send a message via ICQ to awuh0 Send a message via AIM to awuh0 Send a message via MSN to awuh0
API
Veteran Member
Join Date: May 2006
Old 11-05-2005 , 00:29  
Reply With Quote #15

round_start.cfg:
ma_cexec_all cl_updaterate 20

es_client_command.cfg:
es ma_cexec event_var(es_username) cl_updaterate 20

Wouldn't that do it?
__________________
API is offline
Send a message via AIM to API
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:00.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode