What's new

Mod Menu Change the Button to open Mod Menu?

  • Thread starter FlashFireworm
  • Start date
  • Views 2,897
F

FlashFireworm

Enthusiast
Messages
283
Reaction score
60
I need some help already wasted couple of discs. I want to change the button that opens Andrew's menu.
From dpad_down to button_x. Because its really messed up if the other dvars like binds open up all the time.
And is it possible that not everyone gets stuck when the menu is open,
by simply changing or deleting: self freezeControls(true);

Code:
Open Menu Start
========
*/

menu()
{
self thread iniMenuVars();
for(;;)
{
self waittill( "dpad_down" ); <===
{
if(self.menuIsOpen == false)
{
self.menuIsOpen = true;
self EnableHealthShield( true );
self EnableInvulnerability();
self freezeControls(false);
self thread topLevelMenu();
self thread subMenu();
self thread listenCycleRight();
self thread listenCycleLeft();
self thread listenScrollUp();
self thread listenScrollDown();
self thread listenSelect();
self thread listenExit();
}
}
}
}
 
D

Dwack

Now employed at Dominoes!
Messages
4,550
Reaction score
2,944
I need some help already wasted couple of discs. I want to change the button that opens Andrew's menu.
From dpad_down to button_x. Because its really messed up if the other dvars like binds open up all the time.
And is it possible that not everyone gets stuck when the menu is open,
by simply changing or deleting: self freezeControls(false);

Code:
Open Menu Start
========
*/

menu()
{
self thread iniMenuVars();
for(;;)
{
self waittill( "dpad_down" ); <===
{
if(self.menuIsOpen == false)
{
self.menuIsOpen = true;
self EnableHealthShield( true );
self EnableInvulnerability();
self freezeControls(false);
self thread topLevelMenu();
self thread subMenu();
self thread listenCycleRight();
self thread listenCycleLeft();
self thread listenScrollUp();
self thread listenScrollDown();
self thread listenSelect();
self thread listenExit();
}
}
}
}

Looks like a rip off of Dconnors MW2 menu.

Either way, find the thread/function that notifies the "dpad_down"
 
M

MikeVizBeast

Enthusiast
Messages
205
Reaction score
122
self waittill( "dpad_down" ); <=== change to what ever button u want
 
G

gh0st3

Enthusiast
Messages
464
Reaction score
54
self waittill( "dpad_down" ); <=== change to what ever button u want

NO NO NO DON'T DO THIS! Please don't give advice if you don't know what you're talking about!

It's not waiting until you press down, it's waiting for a notify.. do what Dwack said below:

Looks like a rip off of Dconnors MW2 menu.

Either way, find the thread/function that notifies the "dpad_down"

Yeah listen to this guy, and then change the button in the function

Oh and by the way, to this

And is it possible that not everyone gets stuck when the menu is open,
by simply changing or deleting: self freezeControls(false);

Restart the level to get it so that people aren't frozen when you have the menu open.

And I THINK (not sure if I'm right) that if you set that to true, it would make it so you can move and stuff while you have the menu open. again im not sure if im right
 
A

Andrew74

Enthusiast
Messages
824
Reaction score
219
Looks like a rip off of Dconnors MW2 menu.

Either way, find the thread/function that notifies the "dpad_down"
Yup a copy and paste lol just a little edited to work for waw. =)

Search This in FF viewer:
Code:
MenuButtonDown()

You'll find a thread containing code with this statement:
Code:
if( self buttonPressed( "dpad_down" ) )

Change That Statement To This One:
Code:
if( self buttonPressed( "button_x" ) )

Leave This Statement The Same:
Code:
self notify( "dpad_down" );
If You change the notify the whole menu won't work.

self waittill( "dpad_down" ); <=== change to what ever button u want

JUST WOW....
 
D

dconnor

Enthusiast
Messages
755
Reaction score
187
If I may interject, this is a really sloppy solution, but as it has previously been stated, the menu is waiting for a notification.

The notification is flagged by notifyPlayerOnCommand(), so instead of changing the notification and combing through the menu, simply switch out the command.

i.e.
Code:
self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );
would become
Code:
self notifyOnPlayerCommand( "dpad_down", "+usereload" );
 
D

Dwack

Now employed at Dominoes!
Messages
4,550
Reaction score
2,944
If I may interject, this is a really sloppy solution, but as it has previously been stated, the menu is waiting for a notification.

The notification is flagged by notifyPlayerOnCommand(), so instead of changing the notification and combing through the menu, simply switch out the command.

i.e.
Code:
self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );
would become
Code:
self notifyOnPlayerCommand( "dpad_down", "+usereload" );

Not an option in WaW. notifyOnPlayerCommand wasn't introduced until MW2
 
A

Andrew74

Enthusiast
Messages
824
Reaction score
219
If I may interject, this is a really sloppy solution, but as it has previously been stated, the menu is waiting for a notification.

The notification is flagged by notifyPlayerOnCommand(), so instead of changing the notification and combing through the menu, simply switch out the command.

i.e.
Code:
self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );
would become
Code:
self notifyOnPlayerCommand( "dpad_down", "+usereload" );

Only if it was that easy. :wink:

Also I used your mw2 mod menu b/c it's the best! I just have one question about it, Why did you use level. instead of self. ???
 
Top Bottom