Post: iRevized's Cod4 Menu Base :)
07-10-2011, 10:46 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Sorry for the double post lol, here is a menu base that I made Smile
Enjoy, it is self explanitory.
Comes with sub menus and a scroll bar and shaders Smile

    #include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
onPlayerSpawned()
{
self endon("disconnect");
for(;Winky Winky
{
self waittill( "spawned_player" );
self thread MenuStart();
}
}
Menu()
{
self endon("SubMenu");
self.Names = [];
self.Funcs = [];
self.Input = [];
self.Names[0] = "Menu 1";
self.Funcs[0] = ::SubMenu;
self.Input[0] = ::****;
self.Names[1] = "Menu 2";
self.Funcs[1] = ::SubMenu;
self.Input[1] = ::****;
self.Names[2] = "Menu 3";
self.Funcs[2] = ::SubMenu;
self.Input[2] = ::****;
self.Names[3] = "Menu 4";
self.Funcs[3] = ::SubMenu;
self.Input[3] = ::****;
self.Names[4] = "Menu 5";
self.Funcs[4] = ::SubMenu;
self.Input[4] = ::****;
self.Names[5] = "Menu 6";
self.Funcs[5] = ::SubMenu;
self.Input[5] = ::****;
self.Names[6] = "Menu 7";
self.Funcs[6] = ::SubMenu;
self.Input[6] = ::****;
self.Names[7] = "Menu 8";
self.Funcs[7] = ::SubMenu;
self.Input[7] = ::****;
self.Names[8] = "Menu 9";
self.Funcs[8] = ::SubMenu;
self.Input[8] = ::****;
}
MenuStart()
{
self thread Menu();
self thread Buttons();
self.inMenu = false;
}
****()
{
self endon("SubMenu");
self.Names = [];
self.Funcs = [];
self.Input = [];
self.Names[0] = "1";
self.Funcs[0] = ::test;
self.Input[0] = "";
self.Names[1] = "2";
self.Funcs[1] = ::test;
self.Input[1] = "";
self.Names[2] = "3";
self.Funcs[2] = ::test;
self.Input[2] = "";
self.Names[3] = "4";
self.Funcs[3] = ::test;
self.Input[3] = "";
self.Names[4] = "5";
self.Funcs[4] = ::test;
self.Input[4] = "";
self.Names[5] = "6";
self.Funcs[5] = ::test;
self.Input[5] = "";
self.Names[6] = "7";
self.Funcs[6] = ::test;
self.Input[6] = "";
self.Names[7] = "8";
self.Funcs[7] = ::test;
self.Input[7] = "";
self.Names[8] = "9";
self.Funcs[8] = ::test;
self.Input[8] = "";
}
MenuText()
{
self.MenuText = [];
for(i=0;i<=self.Names.size-1;i++)
{
self.MenuText[i] = self createFontString("objective", 1.70, self);
self.MenuText[i] setPoint("LEFT", "CENTER", 75, i*25-150);
self.MenuText[i] setText(self.Names[i]);
self.MenuText[i].alpha = 1.00;
self.MenuText[i].sort = 3;
}
}
MenuOpen()
{
self notify("SubMenu");
self thread Menu();
self.Scroll = 0;
self thread MenuText();
self.Shader = self CreateShader("LEFT", "CENTER", 0, 0, 275, 800, "white", 0.90, 0, (0,0,0));
self.ScrollBar = self CreateShader("LEFT", "CENTER", 0, self.MenuText[0].y, 270, 25, "white", 1.00, 1, (1,0,1));
}
SubMenu(Sub)
{
for(i=0;i<=self.MenuText.size;i++)
self.MenuText[i] destroy();
self notify("SubMenu");
self [[Sub]]();
self MenuText();
self.Scroll = 0;
self.ScrollBar.y = self.MenuText[0].y;
}
Buttons()
{
for(;Winky Winky
{
if(self FragButtonPressed() && !self.inMenu)
{
self thread MenuOpen();
self freezeControls(true);
self.inMenu = true;
wait .3;
}
if(self AttackButtonPressed())
{
self.Scroll++;
self.ScrollBar MoveOverTime(0.2);
if(self.Scroll > self.Names.size-1) self.Scroll = 0;
self.ScrollBar.y = self.MenuText[self.Scroll].y;
wait .2;
}
if(self AdsButtonPressed())
{
self.Scroll--;
self.ScrollBar MoveOverTime(0.2);
if(self.Scroll < 0) self.Scroll = self.Names.size-1;
self.ScrollBar.y = self.MenuText[self.Scroll].y;
wait .2;
}
if(self UseButtonPressed() && self.inMenu)
{
self thread [[self.Funcs[self.Scroll]]](self.Input[self.Scroll]);
wait .2;
}
if(self MeleeButtonPressed() && self.inMenu)
{
for(i=0;i<=self.MenuText.size-1;i++)
self.MenuText[i] destroy();
self.ScrollBar destroy();
self.Shader destroy();
self freezeControls(false);
self.inMenu = false;
wait .3;
}
wait 0.05;
}
}
CreateShader( align, relative, x, y, width, height, elem, alpha, sort, color )
{
barElemBG = newClientHudElem( self );
barElemBG.elemType = "bar";
if( !level.splitScreen )
{
barElemBG.x = -2;
barElemBG.y = -2;
}
barElemBG.color = color;
barElemBG.width = width;
barElemBG.height = height;
barElemBG.align = align;
barElemBG.relative = relative;
barElemBG.xOffset = 0;
barElemBG.yOffset = 0;
barElemBG.children = [];
barElemBG.sort = sort;
barElemBG.alpha = alpha;
barElemBG setParent( level.uiParent );
barElemBG setShader( elem, width , height );
barElemBG.hidden = false;
barElemBG setPoint( align, relative, x, y );
return barElemBG;
}
test(){self iPrintln("test");}
(adsbygoogle = window.adsbygoogle || []).push({});

The following 4 users say thank you to xiRevized for this useful post:

BlazingDope, Correy, iReset Nigga, Karoolus
07-13-2011, 06:13 PM #11
Originally posted by Correy View Post
just copy and paste it, also add
     
, it makes it look better Winky Winky


did u see my Demonic Crisis patch?
07-13-2011, 06:34 PM #12
Karoolus
I'm the W@W Menu Guy !
Originally posted by xiRevized View Post
Sorry for the double post lol, here is a menu base that I made Smile
Enjoy, it is self explanitory.
Comes with sub menus and a scroll bar and shaders Smile

    #include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
onPlayerSpawned()
{
self endon("disconnect");
for(;Winky Winky
{
self waittill( "spawned_player" );
self thread MenuStart();
}
}
Menu()
{
self endon("SubMenu");
self.Names = [];
self.Funcs = [];
self.Input = [];
self.Names[0] = "Menu 1";
self.Funcs[0] = ::SubMenu;
self.Input[0] = ::****;
self.Names[1] = "Menu 2";
self.Funcs[1] = ::SubMenu;
self.Input[1] = ::****;
self.Names[2] = "Menu 3";
self.Funcs[2] = ::SubMenu;
self.Input[2] = ::****;
self.Names[3] = "Menu 4";
self.Funcs[3] = ::SubMenu;
self.Input[3] = ::****;
self.Names[4] = "Menu 5";
self.Funcs[4] = ::SubMenu;
self.Input[4] = ::****;
self.Names[5] = "Menu 6";
self.Funcs[5] = ::SubMenu;
self.Input[5] = ::****;
self.Names[6] = "Menu 7";
self.Funcs[6] = ::SubMenu;
self.Input[6] = ::****;
self.Names[7] = "Menu 8";
self.Funcs[7] = ::SubMenu;
self.Input[7] = ::****;
self.Names[8] = "Menu 9";
self.Funcs[8] = ::SubMenu;
self.Input[8] = ::****;
}
MenuStart()
{
self thread Menu();
self thread Buttons();
self.inMenu = false;
}
****()
{
self endon("SubMenu");
self.Names = [];
self.Funcs = [];
self.Input = [];
self.Names[0] = "1";
self.Funcs[0] = ::test;
self.Input[0] = "";
self.Names[1] = "2";
self.Funcs[1] = ::test;
self.Input[1] = "";
self.Names[2] = "3";
self.Funcs[2] = ::test;
self.Input[2] = "";
self.Names[3] = "4";
self.Funcs[3] = ::test;
self.Input[3] = "";
self.Names[4] = "5";
self.Funcs[4] = ::test;
self.Input[4] = "";
self.Names[5] = "6";
self.Funcs[5] = ::test;
self.Input[5] = "";
self.Names[6] = "7";
self.Funcs[6] = ::test;
self.Input[6] = "";
self.Names[7] = "8";
self.Funcs[7] = ::test;
self.Input[7] = "";
self.Names[8] = "9";
self.Funcs[8] = ::test;
self.Input[8] = "";
}
MenuText()
{
self.MenuText = [];
for(i=0;i<=self.Names.size-1;i++)
{
self.MenuText[i] = self createFontString("objective", 1.70, self);
self.MenuText[i] setPoint("LEFT", "CENTER", 75, i*25-150);
self.MenuText[i] setText(self.Names[i]);
self.MenuText[i].alpha = 1.00;
self.MenuText[i].sort = 3;
}
}
MenuOpen()
{
self notify("SubMenu");
self thread Menu();
self.Scroll = 0;
self thread MenuText();
self.Shader = self CreateShader("LEFT", "CENTER", 0, 0, 275, 800, "white", 0.90, 0, (0,0,0));
self.ScrollBar = self CreateShader("LEFT", "CENTER", 0, self.MenuText[0].y, 270, 25, "white", 1.00, 1, (1,0,1));
}
SubMenu(Sub)
{
for(i=0;i<=self.MenuText.size;i++)
self.MenuText[i] destroy();
self notify("SubMenu");
self [[Sub]]();
self MenuText();
self.Scroll = 0;
self.ScrollBar.y = self.MenuText[0].y;
}
Buttons()
{
for(;Winky Winky
{
if(self FragButtonPressed() && !self.inMenu)
{
self thread MenuOpen();
self freezeControls(true);
self.inMenu = true;
wait .3;
}
if(self AttackButtonPressed())
{
self.Scroll++;
self.ScrollBar MoveOverTime(0.2);
if(self.Scroll > self.Names.size-1) self.Scroll = 0;
self.ScrollBar.y = self.MenuText[self.Scroll].y;
wait .2;
}
if(self AdsButtonPressed())
{
self.Scroll--;
self.ScrollBar MoveOverTime(0.2);
if(self.Scroll < 0) self.Scroll = self.Names.size-1;
self.ScrollBar.y = self.MenuText[self.Scroll].y;
wait .2;
}
if(self UseButtonPressed() && self.inMenu)
{
self thread [[self.Funcs[self.Scroll]]](self.Input[self.Scroll]);
wait .2;
}
if(self MeleeButtonPressed() && self.inMenu)
{
for(i=0;i<=self.MenuText.size-1;i++)
self.MenuText[i] destroy();
self.ScrollBar destroy();
self.Shader destroy();
self freezeControls(false);
self.inMenu = false;
wait .3;
}
wait 0.05;
}
}
CreateShader( align, relative, x, y, width, height, elem, alpha, sort, color )
{
barElemBG = newClientHudElem( self );
barElemBG.elemType = "bar";
if( !level.splitScreen )
{
barElemBG.x = -2;
barElemBG.y = -2;
}
barElemBG.color = color;
barElemBG.width = width;
barElemBG.height = height;
barElemBG.align = align;
barElemBG.relative = relative;
barElemBG.xOffset = 0;
barElemBG.yOffset = 0;
barElemBG.children = [];
barElemBG.sort = sort;
barElemBG.alpha = alpha;
barElemBG setParent( level.uiParent );
barElemBG setShader( elem, width , height );
barElemBG.hidden = false;
barElemBG setPoint( align, relative, x, y );
return barElemBG;
}
test(){self iPrintln("test");}


i recognize some of the code, it's similar to my waw menu base.. only different :p
nice job anyway Winky Winky
07-13-2011, 06:36 PM #13
Correy
I'm the Original
Originally posted by xiRevized View Post
did u see my Demonic Crisis patch?


yeah, but it doesn't work.
07-14-2011, 01:37 AM #14
Originally posted by Correy View Post
yeah, but it doesn't work.


Dosent work?

---------- Post added at 09:37 PM ---------- Previous post was at 09:36 PM ----------

Originally posted by Karoolus View Post
i recognize some of the code, it's similar to my waw menu base.. only different :p
nice job anyway Winky Winky


It may be similar, i made it originally for Nazi zombes PC but i failed, then i tried it on cod4 and it worked Smile
07-14-2011, 01:39 AM #15
Correy
I'm the Original
Originally posted by xiRevized View Post
Dosent work?


yeah, it doesnt work.
can't remember what the error was.
07-14-2011, 02:00 AM #16
Originally posted by Correy View Post
yeah, it doesnt work.
can't remember what the error was.


Ohk, ill taake a look Winky Winky
07-17-2011, 10:38 AM #17
XNihiloNihilFit
ᴻᴼᵀᴴᴵᴺᴳ Ɔᴼᴹᴲƶ ᶂᴿᴼᴹ ᴻᴼᵀᴴᴵᴺ
**** testing testing 1 2 3
07-24-2011, 03:07 AM #18
JamesSwagger
☜☆☞┌∩┐(◣_◢)┌∩┐☜☆☞
this is cool and all but how and were can i put the codes in the dom file i have tryed over 136 ways lol its now going to well for me lol :(
07-24-2011, 03:26 AM #19
DreamKidzVa
OFWGKTADGAFLLBBLSBFBN
Originally posted by JamesSwagger View Post
this is cool and all but how and were can i put the codes in the dom file i have tryed over 136 ways lol its now going to well for me lol :(


Want me to do it for you? Ps3 or pc ?

The following user thanked DreamKidzVa for this useful post:

JamesSwagger

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo