PDA

View Full Version : CVAR revert on Client Command


Alternate
08-06-2005, 21:03
I can set a client CVAR and have it changed on beginning of each round or just on connect to server (Typicaly in clientActive). But of course you can just change it and it won't change back. There are certain values I want to remain restricted on our server.

I think the ideal way to keep a CVAR at a permament setting is to listen for a client command and then if the command is to change a CVAR in the list of protected CVARs then we use the revert command to put it back to the correct value??

Iused to code in C++ about 5yrs ago so i'm being kinda slow and the Source SDK is a little overwhelming for a nub like me
:roll:

Would anyone be able to give me any sample code to do the above? Once I have it sorted for one CVAR then I can do the rest no probs. It mustn't be base on any other plugin (i.e ma_exec), I'd like to hand write this myself have just the one plugin.

Alternate
08-07-2005, 12:03
Anyone? If this isn't the right place to ask maybe some-one could point me to the correct place? Has no-one ever restricted use of certain CVARs?

Mattie
08-07-2005, 12:26
Yeah, wrong forum, this one is only for new plugin announcements. Try this forum:
http://forums.alliedmods.net/forumdisplay.php?f=

Alternate
08-07-2005, 13:04
Apologies you are quite right. I've reposted in the correct forum, please lock or delete this thread.