What's new
  • Howdy, Guest!

    We have issued a forced password reset on all user accounts, meaning you will not be able to login until this process is complete. Instructions will be displayed when you login with your previous credentials, however if for any reason you do not have access to your associated email address, you will need to contact us at [email protected].

    For more information, please read this Important Announcement

    Thank you for being awesome!

Mod Menu [RELEASE] Map Changing Menu

  • Thread starter NITRAM
  • Start date
  • Views 2,794
N

NITRAM

Enthusiast
Messages
998
Reaction score
415
Points
165
Sin$
0
Here is the code i made for changing map from a menu, you can change the map to any map in the game including the Map Packs

First you need to add some menu items,

Code:
level.mapmenuoptions = [];
level.mapmenuoptions[0] = "Normal Maps";
level.mapmenuoptions[1] = "Map Packs DC1/2";
level.NormalMapItems = [];
level.NormalMapItems[0] = "Afghan";
level.NormalMapItems[1] = "Scrapyard";
level.NormalMapItems[2] = "Wasteland";
level.NormalMapItems[3] = "Karachi";
level.NormalMapItems[4] = "Derail";
level.NormalMapItems[5] = "Estate";
level.NormalMapItems[6] = "Favela";
level.NormalMapItems[7] = "Highrise";
level.NormalMapItems[8] = "Invasion";
level.NormalMapItems[9] = "Skidrow";
level.NormalMapItems[10] = "Quarry";
level.NormalMapItems[11] = "Rundown";
level.NormalMapItems[12] = "Rust";
level.NormalMapItems[13] = "Sub Base";
level.NormalMapItems[14] = "Terminal";
level.NormalMapItems[15] = "Underpass";
level.MapPackItems = [];
level.MapPackItems[0] = "DC1";
level.MapPackItems[1] = "Bailout";
level.MapPackItems[2] = "Crash";
level.MapPackItems[3] = "Overgrown";
level.MapPackItems[4] = "Salvage";
level.MapPackItems[5] = "Storm";
level.MapPackItems[6] = "DC2";
level.MapPackItems[7] = "Carnival";
level.MapPackItems[8] = "Fuel";
level.MapPackItems[9] = "Strike";
level.MapPackItems[10] = "Trailer Park";
level.MapPackItems[11] = "Vacant";

Then you need to add these to you displaymenu thread

Code:
if (self.menuVisible == 9) {
for(i = 0; i < 16; i++)  {
if (i == self.menuCursPos) {
self.playerKickMenuText[i] setText("^3" + level.NormalMapItems[i] );                   
} else {
self.playerKickMenuText[i] setText("^1" + level.NormalMapItems[i] );
}
self.playerKickMenuAmount = 16;
}
}
if (self.menuVisible == 10) {
for(i = 0; i < 12; i++)  {
if (i == self.menuCursPos) {
self.playerKickMenuText[i] setText("^3" + level.MapPackItems[i] );                   
} else {
self.playerKickMenuText[i] setText("^1" + level.MapPackItems[i] );
}
self.playerKickMenuAmount = 12;
}
}
if (self.menuVisible == 11) {
for(i = 0; i < 2; i++)  {
if (i == self.menuCursPos) {
self.playerKickMenuText[i] setText("^3" + level.mapmenuoptions[i] );                   
} else {
self.playerKickMenuText[i] setText("^1" + level.mapmenuoptions[i] );
}
self.playerKickMenuAmount = 2;
}
}

Then you need to add this to your runmenu thread

Code:
//Created by Nitram
if (self.menuVisible == 9) {
if (self.buttonA == 1) {
self clearMenu();
self.buttonA = 0;
self.makingChoice = 0;
self.menuVisible = 4;
if (self.menuCursPos==0) {
self.MapValue = "mp_afghan";
level.MapName = "Afghan";
self thread ChangingMapDisplay();
} if (self.menuCursPos==1) {
self.MapValue = "mp_boneyard";
level.MapName = "Scrapyard";
self thread ChangingMapDisplay();
} if (self.menuCursPos==2) {
self.MapValue = "mp_brecourt";
level.MapName = "Wasteland";
self thread ChangingMapDisplay();
} if (self.menuCursPos==3) {
self.MapValue = "mp_checkpoint";
level.MapName = "Karachi";
self thread ChangingMapDisplay();
} if (self.menuCursPos==4) {
self.MapValue = "mp_derail";
level.MapName = "Derail";
self thread ChangingMapDisplay();
} if (self.menuCursPos==5) {
self.MapValue = "mp_estate";
level.MapName = "Estate";
self thread ChangingMapDisplay();
} if (self.menuCursPos==6) {
self.MapValue = "mp_favela";
level.MapName = "Favela";
self thread ChangingMapDisplay();
} if (self.menuCursPos==7) {
self.MapValue = "mp_highrise";
level.MapName = "Highrise";
self thread ChangingMapDisplay();
} if (self.menuCursPos==8) {
self.MapValue = "mp_invasion";
level.MapName = "Invasion";
self thread ChangingMapDisplay();
} if (self.menuCursPos==9) {
self.MapValue = "mp_nightshift";
level.MapName = "Skidrow";
self thread ChangingMapDisplay();				
} if (self.menuCursPos==10) {
self.MapValue = "mp_quarry";
level.MapName = "Quarry";
self thread ChangingMapDisplay();
} if (self.menuCursPos==11) {
self.MapValue = "mp_rundown";
level.MapName = "Rundown";
self thread ChangingMapDisplay();
} if (self.menuCursPos==12) {
self.MapValue = "mp_rust";
level.MapName = "Rust";
self thread ChangingMapDisplay();
} if (self.menuCursPos==13) {
self.MapValue = "mp_subbase";
level.MapName = "Sub base";
self thread ChangingMapDisplay();
} if (self.menuCursPos==14) {
self.MapValue = "mp_terminal";
level.MapName = "Terminal";
self thread ChangingMapDisplay();
} if (self.menuCursPos==15) {
self.MapValue = "mp_underpass";
level.MapName = "Underpass";
self thread ChangingMapDisplay();
}}}

if (self.menuVisible == 10) {
if (self.buttonA == 1) {
self clearMenu();
self.buttonA = 0;
self.makingChoice = 0;
self.menuVisible = 4;
if (self.menuCursPos==0) {
self.menuVisible = 10;
} if (self.menuCursPos==1) {
self.MapValue = "mp_complex";
level.MapName = "Bailout";
self thread ChangingMapDisplay();
} if (self.menuCursPos==2) {
self.MapValue = "mp_crash";
level.MapName = "Crash";
self thread ChangingMapDisplay();
} if (self.menuCursPos==3) {
self.MapValue = "mp_overgrown";
level.MapName = "Overgrown";
self thread ChangingMapDisplay();
} if (self.menuCursPos==4) {
self.MapValue = "mp_compact";
level.MapName = "Salvage";
self thread ChangingMapDisplay();
} if (self.menuCursPos==5) {
self.MapValue = "mp_storm";
level.MapName = "Storm";
self thread ChangingMapDisplay();
} if (self.menuCursPos==6) {				
self.menuVisible = 10;
} if (self.menuCursPos==7) {
self.MapValue = "mp_abandon";
level.MapName = "Carnival";
self thread ChangingMapDisplay();
} if (self.menuCursPos==8) {
self.MapValue = "mp_fuel2";
level.MapName = "Fuel";
self thread ChangingMapDisplay();
} if (self.menuCursPos==9) {
self.MapValue = "mp_strike";
level.MapName = "Strike";
self thread ChangingMapDisplay();
} if (self.menuCursPos==10) {
self.MapValue = "mp_trailerpark";
level.MapName = "Trailer Park";
self thread ChangingMapDisplay();
} if (self.menuCursPos==11) {
self.MapValue = "mp_vacant";
level.MapName = "Vacant";
self thread ChangingMapDisplay();
}}}

if (self.menuVisible == 11) {
if (self.buttonA == 1) {
self clearMenu();
self.buttonA = 0;
self.makingChoice = 0;
self.menuVisible = 4;
if (self.menuCursPos==0) {
self.menuVisible = 9;
self.menuCursPos = 0;
} if (self.menuCursPos==1) {
self.menuVisible = 10;
self.menuCursPos = 0;
}}}

Also add these threads in the same place as the ones above

Code:
ChangingMap()
{
//Created by Nitram
self endon( "disconnect" );
self.displayText = self createFontString( "objective", 1.5 );
self.displayText setPoint( "TOPLEFT", "TOPLEFT", 5, 120 );
for(i=10; i>=0; i--)
{           
self.displayText setText("^2Changing Map To ^1"+level.MapName+"^2 In ^1"+i);
wait 1;
if (i == 0) {   
self.displayText setText("^2Changing Map ...");
wait 2;
map(self.MapValue);
}}}

ChangingMapDisplay()
{
self endon( "disconnect" );
self.menuVisible = 0;
self.menuCursPos = 0;
foreach(player in level.players)
{
player thread ChangingMap();
}}

And for some people know dont know how to add this to your menus,

I have added this menu to Dudeeitsbrian New Patch just to be nice :biggrin:

Here is the link Download Link

Ps: If your going to use Dudeeitsbrian New Patch you need a default_mp.xex file with the Prestige and Negative XP Checks removed I am not allow to post this here so here is a link to a post that will tell you how to make it,

CraigChrist8239 New MW2 XEX Patcher

I forgot to say i added my restart the map code to the menu as well :biggrin:
 
xVVhiteboy

xVVhiteboy

Contributor
Messages
2,902
Reaction score
663
Points
325
Sin$
0
Pretty cool, you left alot of stuff from another menu though.
 
CrAzY FaIrYHoPn

CrAzY FaIrYHoPn

FairyHopn' All Day
Retired
Grammar Nazi TotM MotM
Messages
3,449
Reaction score
1,909
Points
770
Sin$
0
I don't see how this is useful?
 
DemiZe

DemiZe

Contributor
Messages
2,679
Reaction score
409
Points
285
Sin$
0
It's very nice coding, but isn't very useful, anyways nice job with the coding.
 
ydeznutz

ydeznutz

Enthusiast
Messages
783
Reaction score
93
Points
135
Sin$
7
ha sick, well now i dont have to end the game and wast e my time choosing a map :tongue:
 
E Nellie

E Nellie

Enthusiast
Messages
871
Reaction score
233
Points
125
Sin$
0
Looks good but the code is really long there should be a way to shorten it if you use the actual map names such as "mp_vacant" then calling on them later I'll see if i can work on it.
 
Twisted Impulse

Twisted Impulse

Member
Messages
2,781
Reaction score
613
Points
420
Sin$
7
Thanks for putting this in dudeitsbrian's patch, i wouldn't have any idea how to add it into a complex patch like his to be honest, if i fail at trying to put it into the quarantine chaos zombies patch after 5 tries would you mind helping me? :tongue:

would be VERY useful to have in that particular patch so we can change map in the game as a lot of us now play system link, and its horrible to try reconnecting sometimes ^_^ :tongue:
 
Apathy

Apathy

Member
Programmer Modder Hardened Veteran
Messages
3,007
Reaction score
920
Points
455
Sin$
7
beat me to the release i made the exact same thing but not for dudeeitsbrians patch :frown:
im working one something new instead
 
N

NITRAM

Enthusiast
Messages
998
Reaction score
415
Points
165
Sin$
0
beat me to the release i made the exact same thing but not for dudeeitsbrians patch :frown:
i will release mine on this thread a lil later...

I made this for mine patch i just added it to his because everybody uses his or an edited version :biggrin:

Thanks for putting this in dudeitsbrian's patch, i wouldn't have any idea how to add it into a complex patch like his to be honest, if i fail at trying to put it into the quarantine chaos zombies patch after 5 tries would you mind helping me? :tongue:

would be VERY useful to have in that particular patch so we can change map in the game as a lot of us now play system link, and its horrible to try reconnecting sometimes ^_^ :tongue:

Ye if you cant do it send me a link to his patch and ill add it in :biggrin:
 
Degree

Degree

T R A P S O U L
Retired
MotM Fabled Veteran Frame In Gold
Messages
6,227
Reaction score
2,263
Points
670
Sin$
7
Looks very nice. +Rep for the effort.
smile.gif
 
N

NITRAM

Enthusiast
Messages
998
Reaction score
415
Points
165
Sin$
0
Looks good but the code is really long there should be a way to shorten it if you use the actual map names such as "mp_vacant" then calling on them later I'll see if i can work on it.

I know i could of made it 10times smaller if i wanted to :lol: but i wanted to make it look nice for the players in to lobby.

Ps: If your you don't have enough space go and delete everything in

maps/mp/killstreaks/_ac130, maps/mp/killstreaks/_airstrike, maps/mp/killstreaks/_helicopter, maps/mp/killstreaks/_killstreaks, maps/mp/killstreaks/_airdrop

And rename them. there all in another file called common_mp.ff and you can call them up by adding this line to your maps/mp/gametypes/_missions

Code:
#include maps\mp\killstreaks\_killstreaks;

:biggrin:
 
Top Bottom
Login
Register