Adding to Existing Mod.

Have a question you need to ask? Need help? Ask here!

Moderator: Core Staff

Post Reply
CynePhoba
CJ Wannabe
CJ Wannabe
Posts: 5
Joined: May 25th, 2013, 5:04 am

Adding to Existing Mod.

Post by CynePhoba » May 25th, 2013, 5:06 am

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.

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Adding to Existing Mod.

Post by Drofder2004 » May 26th, 2013, 10:18 am

To my knowledge, menu files must be compiled. I may be wrong...
Image
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

CynePhoba
CJ Wannabe
CJ Wannabe
Posts: 5
Joined: May 25th, 2013, 5:04 am

Re: Adding to Existing Mod.

Post by CynePhoba » May 27th, 2013, 2:16 am

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?

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Adding to Existing Mod.

Post by Drofder2004 » May 27th, 2013, 6:21 pm

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?
Image
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

CynePhoba
CJ Wannabe
CJ Wannabe
Posts: 5
Joined: May 25th, 2013, 5:04 am

Re: Adding to Existing Mod.

Post by CynePhoba » May 28th, 2013, 9:38 am

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?
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.

THanks for your help!

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Adding to Existing Mod.

Post by Drofder2004 » May 29th, 2013, 10:36 pm

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?
Image
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

Post Reply

Who is online

Users browsing this forum: No registered users and 40 guests