Post: [RELEASE] DConnors MW2 Menu Base Converted To W@W By IVI40A3Fusionz
02-01-2012, 01:50 PM #1
IVI40A3Fusionz
Former Gaming Squad Member
(adsbygoogle = window.adsbygoogle || []).push({}); So the probably the most 'famous' or used MW2 menu base ever has just been converted by me (IVI40A3Fusionz), i didn't see this anywhere else on this site so i decided to do it. Took about under 5 minutes to convert it it was as simple as swapping the buttons around.

Video:


Code:
    
menu()
{
self endon( "disconnect" );
self endon( "death" );
self.cycle = 0;
self.scroll = 1;
self.getMenu = ::getMenu;
self thread MonitorButtons();
self thread listenUpside Down Happy:iniMenu, "Pressed_L2" );
}
MonitorButtons()
{
self endon("disconnect");
for(;Winky Winky
{
if(self UseButtonPressed())
{
self notify("Pressed_Square");
wait .1;
}
if(self AttackButtonPressed())
{
self notify("Pressed_R1");
wait .1;
}
if(self AdsButtonPressed())
{
self notify("Pressed_L1");
wait .1;
}
if(self SecondaryOffhandButtonPressed())
{
self notify("Pressed_L2");
wait .3;
}
if(self FragButtonPressed())
{
self notify("Pressed_R2");
wait .3;
}
if(self MeleeButtonPressed())
{
self notify("Pressed_Melee");
wait .2;
}
wait .05;
}
}
iniMenu()
{
if( self.MenuIsOpen == false )
{
_openMenu();
self thread drawMenu( self.cycle, self.scroll);
self thread listenMenuEvent( ::cycleRight, "Pressed_R2" );
self thread listenMenuEvent( ::cycleLeft, "Pressed_L2" );
self thread listenMenuEvent( ::scrollUp, "Pressed_L1" );
self thread listenMenuEvent( ::scrollDown, "Pressed_R1" );
self thread listenMenuEvent( ::select, "Pressed_Square" );
self thread runOnEvent( ::exitMenu, "Pressed_Melee" );
level thread listenMenuEvent( ::updateMenu, "connected" );
}
}
select()
{
menu = [[self.getMenu]]();
self thread [[ menu[self.cycle].function[self.scroll] ]]( menu[self.cycle].input[self.scroll] );
}
cycleRight()
{
self.cycle++;
self.scroll = 1;
checkCycle();
drawMenu( self.cycle, self.scroll);
}
cycleLeft()
{
self.cycle--;
self.scroll = 1;
checkCycle();
drawMenu( self.cycle, self.scroll);
}
scrollUp()
{
self.scroll--;
checkScroll();
drawMenu( self.cycle, self.scroll);
}
scrollDown()
{
self.scroll++;
checkScroll();
drawMenu( self.cycle, self.scroll);
}
exitMenu()
{
self.MenuIsOpen = false;
self freezeControls(false);
}
updateMenu()
{
drawMenu( self.cycle, self.scroll );
}
_openMenu()
{
self.MenuIsOpen = true;
self freezeControls(true);
menu = [[self.getMenu]]();
self.numMenus = menu.size;
self.menuSize = [];
for(i = 0;i < self.numMenus;i++) self.menuSize[i] = menu[i].name.size;
}
checkCycle()
{
if(self.cycle > self.numMenus - 1)
{
self.cycle = self.cycle - self.numMenus;
}
else if(self.cycle < 0)
{
self.cycle = self.cycle + self.numMenus;
}
}
checkScroll()
{
if(self.scroll < 1)
{
self.scroll = 1;
}
else if(self.scroll > self.menuSize[self.cycle] - 1)
{
self.scroll = self.menuSize[self.cycle] - 1;
}
}
drawMenu( cycle, scroll )
{
menu = [[self.getMenu]]();
display = [];
if( menu.size > 2 )
{
leftTitle = self createFontString( "objective", 2.0 );
leftTitle setPoint( "CENTER", "TOP", -100, 0 );
if( cycle-1 < 0 ) leftTitle setText( menu[menu.size - 1].name[0] );
else leftTitle setText( menu[cycle - 1].name[0] );
self thread destroyOnAny( leftTitle, "Pressed_R2", "Pressed_L2", "Pressed_L1", "Pressed_R1", "Pressed_Melee", "death" );
level thread destroyOn( leftTitle, "connected" );
rightTitle = self createFontString( "objective", 2.0 );
rightTitle setPoint( "CENTER", "TOP", 100, 0 );
if( cycle > menu.size - 2 ) rightTitle setText( menu[0].name[0] );
else rightTitle setText( menu[cycle + 1].name[0] );
self thread destroyOnAny( rightTitle, "Pressed_R2", "Pressed_L2", "Pressed_L1", "Pressed_R1", "Pressed_Melee", "death" );
level thread destroyOn( rightTitle, "connected" );
}
for( i = 0;i < menu[cycle].name.size;i++ )
{
if(i < 1) display[i] = self createFontString( "objective", 2.0 );
else display[i] = self createFontString( "objective", 1.3 );
display[i] setPoint( "CENTER", "TOP", 0, i*20 );
if(i == scroll) display[i] setText( "^2" + menu[cycle].name[i] );
else display[i] setText( menu[cycle].name[i] );
self thread destroyOnAny( display[i], "Pressed_R2", "Pressed_L2", "Pressed_L1", "Pressed_R1", "Pressed_Melee", "death" );
level thread destroyOn( display[i], "connected" );
}
}
listen( function, event )
{
self endon ( "disconnect" );
self endon ( "death" );
for(;Winky Winky
{
self waittill( event );
self thread [[function]]();
}
}
listenMenuEvent( function, event )
{
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "Pressed_Melee" );
for(;Winky Winky
{
self waittill( event );
self thread [[function]]();
}
}
runOnEvent( function, event )
{
self endon ( "disconnect" );
self endon ( "death" );
self waittill( event );
self thread [[function]]();
}
destroyOn( element, event )
{
self waittill( event );
element destroy();
}
destroyOnAny( element, event1, event2, event3, event4, event5, event6, event7, event8 )
{
self waittill_any( event1, event2, event3, event4, event5, event6, event7, event8 );
element destroy();
}
openSubMenu()
{
self notify( "Pressed_Melee" );
wait .01;
oldMenu = [[self.getMenu]]();
self.input = oldMenu[self.cycle].input[self.scroll];
self.oldCycle = self.cycle;
self.oldScroll = self.scroll;
self.cycle = 0;
self.scroll = 1;
self.getMenu = ::getSubMenu_Menu;
_openMenu();
self thread drawMenu( self.cycle, self.scroll );
self thread listenMenuEvent( ::cycleRight, "Pressed_R2" );
self thread listenMenuEvent( ::cycleLeft, "Pressed_L2" );
self thread listenMenuEvent( ::scrollUp, "Pressed_L1" );
self thread listenMenuEvent( ::scrollDown, "Pressed_R1" );
self thread listenMenuEvent( ::select, "Pressed_Square" );
self thread runOnEvent( ::exitSubMenu, "Pressed_Melee" );
}
exitSubMenu()
{
self.getMenu = ::getMenu;
self.cycle = self.oldCycle;
self.scroll = self.oldScroll;
self.menuIsOpen = false;
wait .01;
self notify( "Pressed_R1" );
}
getSubMenu_Menu()
{
menu = [];
menu[0] = getSubMenu_SubMenu1();
return menu;
}
getSubMenu_SubMenu1()
{
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[0] = "SubMenu Options";
menu.name[1] = "2nd level menu option";
menu.name[2] = "2nd level menu option";
menu.name[3] = "2nd level menu option";
menu.name[4] = "2nd level menu option";
menu.name[5] = "2nd level menu option";

//menu.function[1] = ;
//menu.function[2] = ;
//menu.function[3] = ;
//menu.function[4] = ;
//menu.function[5] = ;

menu.input[1] = "";
menu.input[2] = "";
menu.input[3] = "";
menu.input[4] = "";
menu.input[5] = "";

return menu;
}

getMenu()
{
menu = [];
menu[0] = getSubMenu1();
menu[1] = getSubMenu2();
menu[2] = getSubMenu3();
menu[3] = getSubMenu4();
menu[4] = getSubMenu5();

if(self GetEntityNumber() == 0)
{
menu[menu.size] = getPlayerMenu();
menu[menu.size] = getAdminMenu();
}
return menu;
}

getPlayerMenu()
{
players = spawnStruct();
players.name = [];
players.function = [];
players.input = [];

players.name[0] = "Players";
for( i = 0; i < level.players.size; i++ )
{
players.name[i+1] = level.players[i].name;
players.function[i+1] = :: openSubMenu;
players.input[i+1] = level.players[i];
}
return players;
}

getAdminMenu()
{
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[0] = "Admin";
menu.name[1] = "admin option";
menu.name[2] = "admin option";
menu.name[3] = "admin option";
menu.name[4] = "admin option";
menu.name[5] = "admin option";

//menu.function[1] = ::;
//menu.function[2] = ::;
//menu.function[3] = ::;
//menu.function[4] = ::;
//menu.function[5] = ::;

menu.input[1] = "";
menu.input[2] = "";
menu.input[3] = "";
menu.input[4] = "";
menu.input[5] = "";

return menu;
}

getSubMenu1()
{
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[0] = "Title 1";
menu.name[1] = "option";
menu.name[2] = "option";
menu.name[3] = "option";
menu.name[4] = "option";
menu.name[5] = "option";

//menu.function[1] = ::;
//menu.function[2] = ::;
//menu.function[3] = ::;
//menu.function[4] = ::;
//menu.function[5] = ::;

menu.input[1] = "";
menu.input[2] = "";
menu.input[3] = "";
menu.input[4] = "";
menu.input[5] = "";

return menu;
}

getSubMenu2()
{
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[0] = "Title 2";
menu.name[1] = "option";
menu.name[2] = "option";
menu.name[3] = "option";
menu.name[4] = "option";
menu.name[5] = "option";

//menu.function[1] = ::;
//menu.function[2] = ::;
//menu.function[3] = ::;
//menu.function[4] = ::;
//menu.function[5] = ::;

menu.input[1] = "";
menu.input[2] = "";
menu.input[3] = "";
menu.input[4] = "";
menu.input[5] = "";

return menu;
}


getSubMenu3()
{
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[0] = "Title 3";
menu.name[1] = "option";
menu.name[2] = "option";
menu.name[3] = "option";
menu.name[4] = "option";
menu.name[5] = "option";

//menu.function[1] = ::;
//menu.function[2] = ::;
//menu.function[3] = ::;
//menu.function[4] = ::;
//menu.function[5] = ::;

menu.input[1] = "";
menu.input[2] = "";
menu.input[3] = "";
menu.input[4] = "";
menu.input[5] = "";

return menu;
}


getSubMenu4()
{
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[0] = "Title 4";
menu.name[1] = "option";
menu.name[2] = "option";
menu.name[3] = "option";
menu.name[4] = "option";
menu.name[5] = "option";

//menu.function[1] = ::;
//menu.function[2] = ::;
//menu.function[3] = ::;
//menu.function[4] = ::;
//menu.function[5] = ::;

menu.input[1] = "";
menu.input[2] = "";
menu.input[3] = "";
menu.input[4] = "";
menu.input[5] = "";

return menu;
}

getSubMenu5()
{
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[0] = "Title 5";
menu.name[1] = "option";
menu.name[2] = "option";
menu.name[3] = "option";
menu.name[4] = "option";
menu.name[5] = "option";

//menu.function[1] = ::;
//menu.function[2] = ::;
//menu.function[3] = ::;
//menu.function[4] = ::;
//menu.function[5] = ::;

menu.input[1] = "";
menu.input[2] = "";
menu.input[3] = "";
menu.input[4] = "";
menu.input[5] = "";

return menu;
}


Put This On onplayerspawned:
    
self thread menu();
self thread maps\mp\gametypes\_hud_message::hintMessage( "Press [{+smoke}] for Menu" );


Credits:
    
* DConnor - For the original menu base.
* Me - For converting it.


Known bugs/problems:
* If you try and exit the player options menu it will just take you to a screen with no text (as demonstrated in the video), so just press melee again, this can easily be fixed.

*The text is a little high so for PC users just lower the text for console users it should be fine (as seen in the video).
(adsbygoogle = window.adsbygoogle || []).push({});

The following 3 users say thank you to IVI40A3Fusionz for this useful post:

Correy, Jacob-And-Britt, xRaW
02-03-2012, 05:28 PM #29
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by bloodthugga View Post
yo you good for codin can u help me whit this shit ? i want spawn the bunker in my position zhu2lbunker()
{
level.BunkerOrigin=(2259, 5133, 155);
wait 1;
level thread bunker();
}

i change that shit 4 what ??? level.BunkerOrigin=(2259, 5133, 155); help me please lol ?


    level.BunkerOrigin=(2259, 5133, 155);
is the origin in which the person set the position of the bunker to be spawned at, so you have to change the co0ordinates to fit where you want the bunker to be Smile.
02-03-2012, 07:17 PM #30
bloodthugga
Bounty hunter
yea but i want the bunker spawn on me ?? lol i put video the bunker i create now
02-03-2012, 07:24 PM #31
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by bloodthugga View Post
yea but i want the bunker spawn on me ?? lol i put video the bunker i create now


Then just use:

    
self.origin+(0,0,0)

I put in the +(0,0,0) in there so you can change where you want it to spawn and obviously change 0,0,0 to something else or it will trap you :p.
02-03-2012, 07:59 PM #32
bloodthugga
Bounty hunter
bunkerorigin=self.origin+(,0,0,0); ?
02-03-2012, 08:05 PM #33
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by bloodthugga View Post
bunkerorigin=self.origin+(,0,0,0); ?


    level.BunkerOrigin = self.origin+(0,0,0);


But change the 0's and get the bunker to spawn next to you not on top of you Winky Winky.
02-03-2012, 10:26 PM #34
Niall-Griffiths
Vault dweller
Originally posted by IVI40A3Fusionz View Post
    level.BunkerOrigin = self.origin+(0,0,0);


But change the 0's and get the bunker to spawn next to you not on top of you Winky Winky.



Intrested.. what is the advantage of different menu bases? what is a menu base? im guessing its the actually layout of the menu like how it scrolls side to side ect? and i see u edited karoolus menu base what did you edit and why? just want to learn
02-03-2012, 10:43 PM #35
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by Griffiths View Post
Intrested.. what is the advantage of different menu bases? what is a menu base? im guessing its the actually layout of the menu like how it scrolls side to side ect? and i see u edited karoolus menu base what did you edit and why? just want to learn


A menu base is just like the outline of a mod menu patch, it allows people to have more options in there menu using commands in the game.
I edited Karoolus' base because i wanted to make it look better than it already was.
02-04-2012, 04:42 AM #36
Originally posted by IVI40A3Fusionz View Post
Ewwww that way is bad and nooby :p.

---------- Post added at 03:57 PM ---------- Previous post was at 03:56 PM ----------



You will be able to do it yourself im sure.


im Not using this way lol i only postet it with this way Happy
02-05-2012, 12:46 AM #37
Blackstorm
Veni. Vidi. Vici.
Was a good menu for it's time but is very old and outdated now.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo