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
02-11-2011, 06:13 AM #20
Janiboy
☆ janiboy95 ☆
Cool post, I never had seen a post like this before. rep+ 4 you and your menu's :P

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

<Jimbo>, Jannis96

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo