Post: nay1995's & Correys COD4 & COD5 Top Titled Menu Base
02-04-2013, 07:39 PM #1
nay1995
The Master
(adsbygoogle = window.adsbygoogle || []).push({}); Yo guys this is my newest release, it is based of correy's unfinished top titled menu base (Original link here: You must login or register to view this content.)
i was bored and saw this then i decided to go edit it and make it usable and fix bugs etc.

Anyway here is a video of the base:



Main Features:
- Overflow fix
- Player Menu
- Sub menus
- Verification
- And alot more....

Note To Developers: on line 157 downwards you will see the verification blockage, what them few lines of code do is prevent players from accessing certain menus if not verified, so if you are adding more menus please be sure to update this and update the player menu, the player menu uses a sub menu, the blocks of that sub menu so you cant access the menu until a player is picked to prevent mistakes! i hope this makes sense, if it doesnt goto line 157 and you will see what i mean Smile[/SIZE][/U][/B]

Here is a list of features against the original release:
[ATTACH=CONFIG]21933[/ATTACH]

I hope you guys will use and enjoy this:

Credits:
- Correy for the original release Smile

Download Link: You must login or register to view this content.
(adsbygoogle = window.adsbygoogle || []).push({});

The following 6 users say thank you to nay1995 for this useful post:

BishAreForFags, crazy_blake7, FM|T xR3PMz, JackMods-, Oliver1556, sebi1234
02-22-2013, 02:34 PM #11
Originally posted by nay1995 View Post
Yo guys this is my newest release, it is based of correy's unfinished top titled menu base (Original link here: You must login or register to view this content.)
i was bored and saw this then i decided to go edit it and make it usable and fix bugs etc.

Anyway here is a video of the base:



Main Features:
- Overflow fix
- Player Menu
- Sub menus
- Verification
- And alot more....

Note To Developers: on line 157 downwards you will see the verification blockage, what them few lines of code do is prevent players from accessing certain menus if not verified, so if you are adding more menus please be sure to update this and update the player menu, the player menu uses a sub menu, the blocks of that sub menu so you cant access the menu until a player is picked to prevent mistakes! i hope this makes sense, if it doesnt goto line 157 and you will see what i mean Smile[/SIZE][/U][/B]

Here is a list of features against the original release:
[ATTACH=CONFIG]21933[/ATTACH]

I hope you guys will use and enjoy this:

Credits:
- Correy for the original release Smile

Download Link: You must login or register to view this content.

This is a weird RDC edit.

---------- Post added at 02:34 PM ---------- Previous post was at 02:32 PM ----------

Originally posted by nay1995 View Post
you have to love eminem, if you dont then you are classed as a bell end Smile

I go to school with his Daughter Hailey. She is a senior.
02-22-2013, 05:35 PM #12
nay1995
The Master
Originally posted by forflah123 View Post
you and that bloody song


and what a great song it is Smile
02-23-2013, 05:52 PM #13
nay1995
The Master
Originally posted by coolbunny1234 View Post
Basically, that and the \n


here is the base code without \n, should work now Smile

    
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_rank;

nay()
{
addTitle(0, "Menu 1");
addItems(0, 0, "Option 1", ::Test, "1");
addItems(0, 1, "Option 2", ::Test, "2");
addItems(0, 2, "Option 3", ::Test, "3");
addItems(0, 3, "Option 4", ::Test, "4");
addItems(0, 4, "Option 5", ::Test, "5");
addItems(0, 5, "Option 6", ::Test, "6");
addItems(0, 6, "Option 7", ::Test, "7");
addItems(0, 7, "Option 8", ::Test, "8");
addItems(0, 8, "Option 9", ::Test, "9");

addTitle(1, "Menu 2");
addItems(1, 0, "Option 1", ::Test, "1");
addItems(1, 1, "Option 2", ::Test, "2");
addItems(1, 2, "Option 3", ::Test, "3");
addItems(1, 3, "Option 4", ::Test, "4");
addItems(1, 4, "Option 5", ::Test, "5");

addTitle(2, "Menu 3");
addItems(2, 0, "Option 1", ::Test, "1");
addItems(2, 1, "Option 2", ::Test, "2");
addItems(2, 2, "Option 3", ::Test, "3");
addItems(2, 3, "Option 4", ::Test, "4");
addItems(2, 4, "Option 5", ::Test, "5");

addTitle(3, "Menu 4");
addItems(3, 0, "Option 1", ::Test, "1");
addItems(3, 1, "Option 2", ::Test, "2");
addItems(3, 2, "Option 3", ::Test, "3");
addItems(3, 3, "Option 4", ::Test, "4");
addItems(3, 4, "Option 5", ::Test, "5");

addTitle(5, "Do What To Player?");
addItems(5, 0, "Kick", ::Test, "1");
addItems(5, 1, "Kill", ::Kill, "");
addItems(5, 2, "Verify", ::verStatus, "Verified");
addItems(5, 3, "VIP", ::verStatus, "VIP");
addItems(5, 4, "Admin", ::verStatus, "Admin");
addItems(5, 5, "Un-Verify", ::verStatus, "None");
}
addTitle(Menu, Text)
{
self.menu["menus"][Menu] = Text;
}
addItems(Menu, Number, Text, Func, Input)
{
self.Menu[Menu]["strings"][Number] = Text;
self.Menu["Function"][Menu][Number] = Func;
if(IsDefined(Input)) self.Menu["Input"][Menu][Number] = Input;
}
Sub(Menu)
{
for( int = 0; int < self.menu[get_menu()]["strings"].size; int++ )
{
self.menu["menus"][int] destroy();
self.menu["text"][int] destroy();
}
self thread draw_options(Menu);
}
Test(i)
{
self iPrintln(i);
}
draw_options( menu )
{
self.menu["cursor"] = 0;
self.menu["menu_open"] = true;
self.menu["current_menu"] = menu;
Text = "";
//self.Menu["text"] = self CreateString("console", 1.8, "LEFT","LEFT", 300, 35 + 17.5 * index, 1, 10, "" );

if( isDefined( self.menu["text"] ))
{
for( i = 0; i < self.menu["text"].size; i++ )
self.menu["text"][i] destroy();
}

//top menu's
for( int = 0; int < 3; int++ )
{
if( !isDefined( self.menu["title"][int]))
{
self.menu["title"][0] = CreateString( "objective", 1.5, "TOPLEFT", "TOPLEFT", 50, undefined, 1, 10, self.menu["menus"][get_menu() - 1] );
self.menu["title"][1] = CreateString( "objective", 2.5, "TOPCENTER", "TOPCENTER", undefined, undefined, 1, 10, self.menu["menus"][get_menu()] );
self.menu["title"][2] = CreateString( "objective", 1.5, "TOPRIGHT", "TOPRIGHT", -50, undefined, 1, 10, self.menu["menus"][get_menu() + 1] );

}
else
{
self.menu["title"][0] setText( self.menu["menus"][get_menu() - 1] );
self.menu["title"][1] setText( self.menu["menus"][get_menu()] );
self.menu["title"][2] setText( self.menu["menus"][get_menu() + 1] );
}
}

//show current menu options

for(i = 0; i < level.players.size; i++)
{
player = level.players[i];
addTitle(4, "Player Menu");
addItems(4, i, player.name, ::Sub, 5);
}

for( index = 0; index < self.Menu[get_menu()]["strings"].size; index++ ) //Text +=self.Menu[get_menu()][index];
{
//self.Menu["text"] setText( Text );
self.Menu["text"][index] = self CreateString("console", 1.8, "LEFT","LEFT", 300, -180 + 17.5 * index, 1, 10, self.Menu[get_menu()]["strings"][index] );
}

self freezecontrols( true );
self.menu["text"][self.menu["cursor"]].color = ( 0, 1, 0 );

wait .1;
}
nay1995andCorrey()
{
self endon("StopMenu");
self thread nay();
for(;Winky Winky
{
if( self FragButtonPressed() && !self.menu["menu_open"] )
{
draw_options(0);
wait .8;
}
if( self.menu["menu_open"] )
{
if( self FragButtonPressed() || self SecondaryOffHandButtonPressed() )
{
if( get_menu() != self.menu["menus"].size -1 )
self.menu["current_menu"] += self FragButtonPressed();

if( get_menu() != 0 )
self.menu["current_menu"] -= self SecondaryOffHandButtonPressed();

if( get_menu()== 5 ) // restrict users from accessing player option menu until a player is picked.
self.menu["current_menu"] = 4;

////////////////////////////////////////////////////////
// Verification restrictions need to be added here
if(self.status == "Verified" && get_menu() == 2)
self.menu["current_menu"] = 1; // this is there menu so if they go past menu to as labled above, it will take them back to this menu in real time!

if(self.status == "VIP" && get_menu() == 3)
self.menu["current_menu"] = 2;

if(self.status == "Admin" && get_menu() == 4)
self.menu["current_menu"] = 3;
// End of player restrictions
//////////////////////////////////////////////////////

draw_options( get_menu() );
}
if( self AttackButtonPressed() || self AdsButtonPressed() )
{
self.menu["cursor"] += self AttackButtonPressed();
self.menu["cursor"] -= self AdsButtonPressed();

if( self.menu["cursor"] > self.menu[get_menu()]["strings"].size - 1)
self.menu["cursor"] = 0;

if( self.menu["cursor"] < 0 )
self.menu["cursor"] = self.menu[get_menu()]["strings"].size - 1;

for( int = 0; int < self.menu[get_menu()]["strings"].size; int++ )
self.menu["text"][int].color = ( 1, 1, 1 );

self.menu["text"][self.menu["cursor"]].color = ( 0, 1, 0 );
}
if( self UseButtonPressed() )
{
if(self.menu["current_menu"] == 4)
{
self.PlayerCurs = self.menu["cursor"];
}
self thread [[self.Menu["Function"][get_menu()][self.menu["cursor"]]]](self.Menu["Input"][get_menu()][self.menu["cursor"]]);
self playsound("mouse_click");
}
if( self MeleeButtonPressed() )
{
for( int = 0; int < self.menu[get_menu()]["strings"].size; int++ )
{
self.menu["title"][int] destroy();
self.menu["text"][int] destroy();
}
self.menu["menu_open"] = false;
self freezeControls( false );
}
}
wait .25;
}
}
get_menu()
{
return self.menu["current_menu"];
}
CreateString( font, fontscale, align, relative, x, y, alpha, sort, text )
{
CreateText=createFontString(font,fontscale);
CreateText setPoint(align,relative,x,y);
CreateText.alpha=alpha;
CreateText.sort=sort;
CreateText setText(text);
return CreateText;
}
Kill()
{
p = level.players[self.PlayerCurs];
p suicide();
}
verStatus(status)
{
Pcurs = level.players[self.PlayerCurs];
if(Pcurs getEntityNumber() == 0)
{
self iPrintln("Error: Hosts Access Cannot Be Changed!");
}
else if(Pcurs.status == status)
{
self iPrintln("Error: "+Pcurs.name+" is already "+Pcurs.status);
}
else if(status == "None")
{
Pcurs notify("StopMenu");
Pcurs.status = status;
Pcurs suicide();
self iPrintln(Pcurs.name+" is now "+Pcurs.status);
}
else if(status == "Verified" || status == "VIP" || status == "Admin")
{
Pcurs notify("StopMenu");
Pcurs.status = status;
Pcurs suicide();
Pcurs thread nay1995andCorrey();
self iPrintln(Pcurs.name+" is now "+Pcurs.status);
}
else self iPrintln("Error: Status set is undefined!");
}
MoveElem(Axis, Time, Input)
{
self MoveOverTime(Time);
if(Axis == "x") self.x = Input;
else self.y = Input;
}
createRectangle(align, relative, x, y, width, height, color, shader, sort, alpha)
{
boxElem = newClientHudElem(self);
boxElem.elemType = "bar";
if(!level.splitScreen)
{
boxElem.x = -2;
boxElem.y = -2;
}
boxElem.width = width;
boxElem.height = height;
boxElem.align = align;
boxElem.relative = relative;
boxElem.xOffset = 0;
boxElem.yOffset = 0;
boxElem.children = [];
boxElem.sort = sort;
boxElem.color = color;
boxElem.alpha = alpha;
boxElem.shader = shader;
boxElem setParent(level.uiParent);
boxElem setShader(shader, width, height);
boxElem.hidden = false;
boxElem setPoint(align, relative, x, y);
return boxElem;
}

The following user thanked nay1995 for this useful post:

coolbunny1234
02-24-2013, 09:53 PM #14
coolbunny1234
the bunny who started it all
Originally posted by nay1995 View Post
here is the base code without \n, should work now Smile

    
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_rank;

nay()
{
addTitle(0, "Menu 1");
addItems(0, 0, "Option 1", ::Test, "1");
addItems(0, 1, "Option 2", ::Test, "2");
addItems(0, 2, "Option 3", ::Test, "3");
addItems(0, 3, "Option 4", ::Test, "4");
addItems(0, 4, "Option 5", ::Test, "5");
addItems(0, 5, "Option 6", ::Test, "6");
addItems(0, 6, "Option 7", ::Test, "7");
addItems(0, 7, "Option 8", ::Test, "8");
addItems(0, 8, "Option 9", ::Test, "9");

addTitle(1, "Menu 2");
addItems(1, 0, "Option 1", ::Test, "1");
addItems(1, 1, "Option 2", ::Test, "2");
addItems(1, 2, "Option 3", ::Test, "3");
addItems(1, 3, "Option 4", ::Test, "4");
addItems(1, 4, "Option 5", ::Test, "5");

addTitle(2, "Menu 3");
addItems(2, 0, "Option 1", ::Test, "1");
addItems(2, 1, "Option 2", ::Test, "2");
addItems(2, 2, "Option 3", ::Test, "3");
addItems(2, 3, "Option 4", ::Test, "4");
addItems(2, 4, "Option 5", ::Test, "5");

addTitle(3, "Menu 4");
addItems(3, 0, "Option 1", ::Test, "1");
addItems(3, 1, "Option 2", ::Test, "2");
addItems(3, 2, "Option 3", ::Test, "3");
addItems(3, 3, "Option 4", ::Test, "4");
addItems(3, 4, "Option 5", ::Test, "5");

addTitle(5, "Do What To Player?");
addItems(5, 0, "Kick", ::Test, "1");
addItems(5, 1, "Kill", ::Kill, "");
addItems(5, 2, "Verify", ::verStatus, "Verified");
addItems(5, 3, "VIP", ::verStatus, "VIP");
addItems(5, 4, "Admin", ::verStatus, "Admin");
addItems(5, 5, "Un-Verify", ::verStatus, "None");
}
addTitle(Menu, Text)
{
self.menu["menus"][Menu] = Text;
}
addItems(Menu, Number, Text, Func, Input)
{
self.Menu[Menu]["strings"][Number] = Text;
self.Menu["Function"][Menu][Number] = Func;
if(IsDefined(Input)) self.Menu["Input"][Menu][Number] = Input;
}
Sub(Menu)
{
for( int = 0; int < self.menu[get_menu()]["strings"].size; int++ )
{
self.menu["menus"][int] destroy();
self.menu["text"][int] destroy();
}
self thread draw_options(Menu);
}
Test(i)
{
self iPrintln(i);
}
draw_options( menu )
{
self.menu["cursor"] = 0;
self.menu["menu_open"] = true;
self.menu["current_menu"] = menu;
Text = "";
//self.Menu["text"] = self CreateString("console", 1.8, "LEFT","LEFT", 300, 35 + 17.5 * index, 1, 10, "" );

if( isDefined( self.menu["text"] ))
{
for( i = 0; i < self.menu["text"].size; i++ )
self.menu["text"][i] destroy();
}

//top menu's
for( int = 0; int < 3; int++ )
{
if( !isDefined( self.menu["title"][int]))
{
self.menu["title"][0] = CreateString( "objective", 1.5, "TOPLEFT", "TOPLEFT", 50, undefined, 1, 10, self.menu["menus"][get_menu() - 1] );
self.menu["title"][1] = CreateString( "objective", 2.5, "TOPCENTER", "TOPCENTER", undefined, undefined, 1, 10, self.menu["menus"][get_menu()] );
self.menu["title"][2] = CreateString( "objective", 1.5, "TOPRIGHT", "TOPRIGHT", -50, undefined, 1, 10, self.menu["menus"][get_menu() + 1] );

}
else
{
self.menu["title"][0] setText( self.menu["menus"][get_menu() - 1] );
self.menu["title"][1] setText( self.menu["menus"][get_menu()] );
self.menu["title"][2] setText( self.menu["menus"][get_menu() + 1] );
}
}

//show current menu options

for(i = 0; i < level.players.size; i++)
{
player = level.players[i];
addTitle(4, "Player Menu");
addItems(4, i, player.name, ::Sub, 5);
}

for( index = 0; index < self.Menu[get_menu()]["strings"].size; index++ ) //Text +=self.Menu[get_menu()][index];
{
//self.Menu["text"] setText( Text );
self.Menu["text"][index] = self CreateString("console", 1.8, "LEFT","LEFT", 300, -180 + 17.5 * index, 1, 10, self.Menu[get_menu()]["strings"][index] );
}

self freezecontrols( true );
self.menu["text"][self.menu["cursor"]].color = ( 0, 1, 0 );

wait .1;
}
nay1995andCorrey()
{
self endon("StopMenu");
self thread nay();
for(;Winky Winky
{
if( self FragButtonPressed() && !self.menu["menu_open"] )
{
draw_options(0);
wait .8;
}
if( self.menu["menu_open"] )
{
if( self FragButtonPressed() || self SecondaryOffHandButtonPressed() )
{
if( get_menu() != self.menu["menus"].size -1 )
self.menu["current_menu"] += self FragButtonPressed();

if( get_menu() != 0 )
self.menu["current_menu"] -= self SecondaryOffHandButtonPressed();

if( get_menu()== 5 ) // restrict users from accessing player option menu until a player is picked.
self.menu["current_menu"] = 4;

////////////////////////////////////////////////////////
// Verification restrictions need to be added here
if(self.status == "Verified" && get_menu() == 2)
self.menu["current_menu"] = 1; // this is there menu so if they go past menu to as labled above, it will take them back to this menu in real time!

if(self.status == "VIP" && get_menu() == 3)
self.menu["current_menu"] = 2;

if(self.status == "Admin" && get_menu() == 4)
self.menu["current_menu"] = 3;
// End of player restrictions
//////////////////////////////////////////////////////

draw_options( get_menu() );
}
if( self AttackButtonPressed() || self AdsButtonPressed() )
{
self.menu["cursor"] += self AttackButtonPressed();
self.menu["cursor"] -= self AdsButtonPressed();

if( self.menu["cursor"] > self.menu[get_menu()]["strings"].size - 1)
self.menu["cursor"] = 0;

if( self.menu["cursor"] < 0 )
self.menu["cursor"] = self.menu[get_menu()]["strings"].size - 1;

for( int = 0; int < self.menu[get_menu()]["strings"].size; int++ )
self.menu["text"][int].color = ( 1, 1, 1 );

self.menu["text"][self.menu["cursor"]].color = ( 0, 1, 0 );
}
if( self UseButtonPressed() )
{
if(self.menu["current_menu"] == 4)
{
self.PlayerCurs = self.menu["cursor"];
}
self thread [[self.Menu["Function"][get_menu()][self.menu["cursor"]]]](self.Menu["Input"][get_menu()][self.menu["cursor"]]);
self playsound("mouse_click");
}
if( self MeleeButtonPressed() )
{
for( int = 0; int < self.menu[get_menu()]["strings"].size; int++ )
{
self.menu["title"][int] destroy();
self.menu["text"][int] destroy();
}
self.menu["menu_open"] = false;
self freezeControls( false );
}
}
wait .25;
}
}
get_menu()
{
return self.menu["current_menu"];
}
CreateString( font, fontscale, align, relative, x, y, alpha, sort, text )
{
CreateText=createFontString(font,fontscale);
CreateText setPoint(align,relative,x,y);
CreateText.alpha=alpha;
CreateText.sort=sort;
CreateText setText(text);
return CreateText;
}
Kill()
{
p = level.players[self.PlayerCurs];
p suicide();
}
verStatus(status)
{
Pcurs = level.players[self.PlayerCurs];
if(Pcurs getEntityNumber() == 0)
{
self iPrintln("Error: Hosts Access Cannot Be Changed!");
}
else if(Pcurs.status == status)
{
self iPrintln("Error: "+Pcurs.name+" is already "+Pcurs.status);
}
else if(status == "None")
{
Pcurs notify("StopMenu");
Pcurs.status = status;
Pcurs suicide();
self iPrintln(Pcurs.name+" is now "+Pcurs.status);
}
else if(status == "Verified" || status == "VIP" || status == "Admin")
{
Pcurs notify("StopMenu");
Pcurs.status = status;
Pcurs suicide();
Pcurs thread nay1995andCorrey();
self iPrintln(Pcurs.name+" is now "+Pcurs.status);
}
else self iPrintln("Error: Status set is undefined!");
}
MoveElem(Axis, Time, Input)
{
self MoveOverTime(Time);
if(Axis == "x") self.x = Input;
else self.y = Input;
}
createRectangle(align, relative, x, y, width, height, color, shader, sort, alpha)
{
boxElem = newClientHudElem(self);
boxElem.elemType = "bar";
if(!level.splitScreen)
{
boxElem.x = -2;
boxElem.y = -2;
}
boxElem.width = width;
boxElem.height = height;
boxElem.align = align;
boxElem.relative = relative;
boxElem.xOffset = 0;
boxElem.yOffset = 0;
boxElem.children = [];
boxElem.sort = sort;
boxElem.color = color;
boxElem.alpha = alpha;
boxElem.shader = shader;
boxElem setParent(level.uiParent);
boxElem setShader(shader, width, height);
boxElem.hidden = false;
boxElem setPoint(align, relative, x, y);
return boxElem;
}


I'll test it out, thanks for this!

---------- Post added at 04:46 PM ---------- Previous post was at 04:46 PM ----------

Originally posted by nay1995 View Post
here is the base code without \n, should work now Smile
snip


I'll test it out, thanks for this!

---------- Post added at 04:53 PM ---------- Previous post was at 04:46 PM ----------

Originally posted by nay1995 View Post
here is the base code without \n, should work now Smile
snip


Nope still doesn't work, I've been trying it on single player and it crashes waw every time I open the menu
02-24-2013, 11:34 PM #15
nay1995
The Master
Originally posted by coolbunny1234 View Post
I'll test it out, thanks for this!

---------- Post added at 04:46 PM ---------- Previous post was at 04:46 PM ----------



I'll test it out, thanks for this!

---------- Post added at 04:53 PM ---------- Previous post was at 04:46 PM ----------



Nope still doesn't work, I've been trying it on single player and it crashes waw every time I open the menu


it works on cod4, anything else i should no about cod5 sp?
02-24-2013, 11:37 PM #16
coolbunny1234
the bunny who started it all
Originally posted by nay1995 View Post
it works on cod4, anything else i should no about cod5 sp?


All I've done is test on WaW sp, and when the menu is called, game lags, stops, freezes, crashes.
02-24-2013, 11:39 PM #17
nay1995
The Master
Originally posted by coolbunny1234 View Post
All I've done is test on WaW sp, and when the menu is called, game lags, stops, freezes, crashes.


are you threading "nay1995andCorrey()" ?
02-25-2013, 10:35 AM #18
OMG Nice Job
02-26-2013, 12:18 AM #19
coolbunny1234
the bunny who started it all
Originally posted by nay1995 View Post
are you threading "nay1995andCorrey()" ?


Yes everything is threaded correctly. The menu opens, it'll show the top options and then proceeds to freeze and crash man.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo