Hey guys.
I have a mod that i am making a few modifications to (just adding code for the purpose of our servers needs..not editing previous code.) All credit goes to the original mod developer.
Anyway. I have the code that i need for one part of it, and that is all working properly. I have run into a problem though.
I need to find out when a client dvar stops equaling a value, and either change it back, or do something "annoying" until they change it back (to force this value.)
I understand there is no straight way to find a client dvar. I found some code that blurs the screen when the client dvar is not equal to a certain value, but it uses menu files. In fact, the only way that i can find to get client dvars uses .menu files.
The problem that i face is that the mod is already compiled. I know you can add .gsc files to the mod once it is compiled, but i'm just wondering if there is any way that you can add .menu files to the mod once it is compiled? And if you just add the file in the /ui_mp/scriptmenus folder, do you need to load/precache the file?
Any help is appreciated.
Thanks,
SuperNova.
Adding to Existing Mod.
Moderator: Core Staff
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Adding to Existing Mod.
To my knowledge, menu files must be compiled. I may be wrong...

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: Adding to Existing Mod.
So is there any way to compile it and then add it to the mod (like you do with a .gsc file?)
If not, does anyone know any way to make it so certain client dvars can't be changed?
If not, does anyone know any way to make it so certain client dvars can't be changed?
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Adding to Existing Mod.
You cannot monitor a DVAR.
The only thing you can do is set the DVAR, if you want to force it you could just loop every few ms setting the value, but I personally think screwing around with player variables is bad practice.
Why do you need to do what you are doing?
The only thing you can do is set the DVAR, if you want to force it you could just loop every few ms setting the value, but I personally think screwing around with player variables is bad practice.
Why do you need to do what you are doing?

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: Adding to Existing Mod.
Its for the CyberGamer match servers. They have made a new rule (cg_weaponcycledelay = 700) and would like it enforced on their servers. I've got it setting the dvar on spawn and server join, but wanted to know if there was a way to check when the dvar has been changed or stop it from changing. i know you can do it with menu files (other ones are built into the mod) but i don't have access to the core files.Drofder2004 wrote:You cannot monitor a DVAR.
The only thing you can do is set the DVAR, if you want to force it you could just loop every few ms setting the value, but I personally think screwing around with player variables is bad practice.
Why do you need to do what you are doing?
THanks for your help!
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Adding to Existing Mod.
1. If you are using an official mod, why not just ask the developers?
2. OpenWarfare Mod has competition modes and is entirely open source.
3. Use Punkbuster DVAR limiting?
2. OpenWarfare Mod has competition modes and is entirely open source.
3. Use Punkbuster DVAR limiting?

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Who is online
Users browsing this forum: No registered users and 2 guests