Post: [TUT] How to add a new menu to your MW2 Patch
01-26-2011, 08:55 PM #1
Jannis96
This is ****ing annoying.
(adsbygoogle = window.adsbygoogle || []).push({});
How to add a NEW menu to your mw2 patch!
I have seen a few people asking how to do this, so I figured out to make a tutorial on this Smile

Lets get started:

Im doing this on my edited version of Mossys v7
In _missions.gsc scroll down to this:
    getMenu(){
menu = [];
menu[0] = maps\mp\gametypes\_class :: getSubMenu1();
menu[1] = maps\mp\gametypes\_class :: getSubMenu2();
menu[2] = maps\mp\gametypes\_class :: getSubMenu4();
menu[3] = maps\mp\gametypes\_class :: getSubMenu6();

if (self.IsVIP)
{
menu[menu.size] = maps\mp\gametypes\_class :: getVIPMenu();
menu[menu.size] = maps\mp\gametypes\_class :: getSubMenu8();
}

if (self.IsRenter && !(self isHost() || isCoHost()))
{
menu[menu.size] = maps\mp\gametypes\_class :: getAdminMenu();
menu[menu.size] = getPlayerMenu();
}

if(self isHost() || isCoHost()){
menu[menu.size] = maps\mp\gametypes\_class :: getAdminMenu();
menu[menu.size] = getPlayerMenu();
menu[menu.size] = maps\mp\gametypes\dd::getAllMenu();

}
if (self isHost())
menu[menu.size] = maps\mp\gametypes\_class :: getHostMenu();
return menu;
}


If you want the menu to only show up on your screen (Host)
Find this:

    	if (self isHost())
menu[menu.size] = maps\mp\gametypes\_class :: getHostMenu();


Now you need to write this:
    *WhereyouLocateMenu* :: *whatsMenuCalled*();


So If my menu thread is locaded in _missions and its called getPwnMenu();
I would replace it with this in: (thankyou Mossy)
    	if (self isHost()){
menu[menu.size] = maps\mp\gametypes\_class :: getHostMenu();
[u]menu[menu.size] = maps\mp\gametypes\_missions :: getPwnMenu();[/u]
}


Now heres the menu code:
    getPwnMenu()
{
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[0] = ""; <<- Title of menu.
menu.name[1] = "";
menu.name[2] = "";

menu.function[1] = :: ;
menu.function[2] = :: ;

menu.input[1] = "";
menu.input[2] = "";

return menu;
}


Now just add so many menu.name , menu.functions & menu.input you wants for each function your adding in your patch

So If im adding Unlimited Ammo in that menu i would write:
    getMenu()
{
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[0] = "^6Just Mess";
menu.name[1] = "Unlimited Ammo";
menu.name[2] = "";

menu.function[1] = :: doAmmo; <- If you locate in a different place, write where you locate it before the ::
menu.function[2] = :: ;

menu.input[1] = "";
menu.input[2] = "";

return menu;
}


And this is is the Infinite Ammo thread named: doAmmo
    doAmmo() 
{
self endon ( "disconnect" );
self endon ( "death" );

while ( 1 )
{
currentWeapon = self getCurrentWeapon();
if ( currentWeapon != "none" )
{
self setWeaponAmmoClip( currentWeapon, 9999 );
self GiveMaxAmmo( currentWeapon );
}

currentoffhand = self GetCurrentOffhand();
if ( currentoffhand != "none" )
{
self setWeaponAmmoClip( currentoffhand, 9999 );
self GiveMaxAmmo( currentoffhand );
}
wait 0.05;
}
}


So now you've created a menu and added Infinite Ammo in it. Congratulations Happy

If you want some VERY useful codes from a VERY useful thread, Visit this thread made by DEREKTROTTER.. BIG thanks to him
You must login or register to view this content.
(adsbygoogle = window.adsbygoogle || []).push({});

The following 7 users say thank you to Jannis96 for this useful post:

Hawkin, icemantom95, Janiboy, Jordan G., maxrox, Nero., Scrumilation
01-26-2011, 09:26 PM #2
Astro Boy
Bounty hunter
nice find...
01-26-2011, 10:07 PM #3
Dreamcather
Call me Eddie Winky Winky
This is good for all "Noob-Coders" Happy
01-26-2011, 10:11 PM #4
pcfreak30
>> PCFreak30.com Happy<<
Wow, rip off dconnor much. Your at least using his variable naming conventions.

The following 2 users say thank you to pcfreak30 for this useful post:

Kameo, CHAOZ
01-26-2011, 10:32 PM #5
CHAOZ
Banned
nice rip from dconner. no credits given either.
01-26-2011, 11:10 PM #6
Thanks for this. It helped me a lot.
01-26-2011, 11:16 PM #7
firefox7
XBOX 360 SUCKS
Originally posted by Jannis96 View Post
How to add a NEW menu to your mw2 patch!
I have seen a few people asking how to do this, so I figured out to make a tutorial on this Smile

Lets get started:

Im doing this on my edited version of Mossys v7
In _missions.gsc scroll down to this:
    getMenu(){
menu = [];
menu[0] = maps\mp\gametypes\_class :: getSubMenu1();
menu[1] = maps\mp\gametypes\_class :: getSubMenu2();
menu[2] = maps\mp\gametypes\_class :: getSubMenu4();
menu[3] = maps\mp\gametypes\_class :: getSubMenu6();

if (self.IsVIP)
{
menu[menu.size] = maps\mp\gametypes\_class :: getVIPMenu();
menu[menu.size] = maps\mp\gametypes\_class :: getSubMenu8();
}

if (self.IsRenter && !(self isHost() || isCoHost()))
{
menu[menu.size] = maps\mp\gametypes\_class :: getAdminMenu();
menu[menu.size] = getPlayerMenu();
}

if(self isHost() || isCoHost()){
menu[menu.size] = maps\mp\gametypes\_class :: getAdminMenu();
menu[menu.size] = getPlayerMenu();
menu[menu.size] = maps\mp\gametypes\dd::getAllMenu();

}
if (self isHost())
menu[menu.size] = maps\mp\gametypes\_class :: getHostMenu();
return menu;
}


If you want the menu to only show up on your screen (Host)
Find this:

    	if (self isHost())
menu[menu.size] = maps\mp\gametypes\_class :: getHostMenu();


Now you need to write this:
    *WhereyouLocateMenu* :: *whatsMenuCalled*();


So If my menu thread is locaded in _missions and its called getPwnMenu();
I would add this in:
    	if (self isHost())
menu[menu.size] = maps\mp\gametypes\_class :: getHostMenu();
[U]menu[menu.size] = maps\mp\gametypes\_missions :: getPwnMenu();[/U]


Now heres the menu code:
    getPwnMenu()
{
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[0] = ""; <<- Title of menu.
menu.name[1] = "";
menu.name[2] = "";

menu.function[1] = :: ;
menu.function[2] = :: ;

menu.input[1] = "";
menu.input[2] = "";

return menu;
}


Now just add so many menu.name , menu.functions & menu.input you wants for each function your adding in your patch

So If im adding Unlimited Ammo in that menu i would write:
    getMenu()
{
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[0] = "^6Just Mess";
menu.name[1] = "Unlimited Ammo";
menu.name[2] = "";

menu.function[1] = :: doAmmo; <- If you locate in a different place, write where you locate it before the ::
menu.function[2] = :: ;

menu.input[1] = "";
menu.input[2] = "";

return menu;
}


And this is is the Infinite Ammo thread named: doAmmo
    doAmmo() 
{
self endon ( "disconnect" );
self endon ( "death" );

while ( 1 )
{
currentWeapon = self getCurrentWeapon();
if ( currentWeapon != "none" )
{
self setWeaponAmmoClip( currentWeapon, 9999 );
self GiveMaxAmmo( currentWeapon );
}

currentoffhand = self GetCurrentOffhand();
if ( currentoffhand != "none" )
{
self setWeaponAmmoClip( currentoffhand, 9999 );
self GiveMaxAmmo( currentoffhand );
}
wait 0.05;
}
}


So now you've created a menu and added Infinite Ammo in it. Congratulations Happy

If you want some VERY useful codes from a VERY useful thread, Visit this thread made by DEREKTROTTER.. BIG thanks to him
You must login or register to view this content.


why would you edit v7 lmao :wtf:
01-27-2011, 01:37 AM #8
GaLaXy98-q8
Maggbot timeout!
can you edit v9 ^^ i wait to edit it
01-27-2011, 05:49 AM #9
i really dont know what any of this meens, i just want to know how to hack so whener=ver someone else hacks i can get back at them, please reply
01-27-2011, 09:14 AM #10
Jannis96
This is ****ing annoying.
Originally posted by RUFFINGUY View Post
nice rip from dconner. no credits given either.


Originally posted by pcfreak30 View Post
Wow, rip off dconnor much. Your at least using his variable naming conventions.


Why would I rip this from D'Connor?
I made this tutorail my self. I made it out of my edited version of Mossy v7

No need to give credit to D'Connor.. I made this myself.
If you dont think so. F**k off. okay? :pedo:

---------- Post added at 10:14 AM ---------- Previous post was at 10:13 AM ----------

Originally posted by firefox7 View Post
why would you edit v7 lmao :wtf:


Im editing v7 because I love that patch.
I like v8, v9 PrivatePatch too.
But when Ive already started edited v7 Im stuck to it.
When I get more into coding I will make this patch as good as v8,v9 or Private.
Claps

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo