Post: [RELEASE] Nice Little Menu Base
12-04-2011, 10:15 PM #1
IVI40A3Fusionz
Former Gaming Squad Member
(adsbygoogle = window.adsbygoogle || []).push({}); Nice little menu base which i got from Correy his thread is here: You must login or register to view this content.

All i did was add player menu, verification and overflow fix i just thought it would clean up the patches people are making so they aren't just using Karoolus' or Elites menu bases.

I was going to keep this to myself and release a menu with it then release the base but i thought to myself that's pointless making people wait for me to release something for a game that's old.

Menus main features:
    *Nice sleek scrolling,
*Fade in and out text,
*Animated menu,
*Overflow fix,
*Player menu,
*Verification system,
*Easy to add options.


Add This Somewhere To onplayerspawned()
    if(self GetEntityNumber() == 0)
{
self freezecontrols(false);
self.vip = true;
self.cohost = true;
self thread BuildMenu();
}[/SPOILER]

Here's the menu:
    BuildMenu()
{
self endon("stop_menu");
self endon("unverified");
self.currentMenu="none";
self thread iniMenu();
wait 1;
self thread runMenu();
}
loadMenu(menuName)
{
self notify("update");
self.curs=0;
self.currentMenu=menuName;
string = "";
for( i=0; i<self.opt[menuName].size; i++ )
string += self.opt[menuName][i]+"\n";
self.display = createFontString( "hud_small", 2.0, self);
self.display setPoint( "LEFT", "TOP", 112, 100);
self.display setText( string );
self.display.alpha = 6;
self.display.sort = 15;
self.display.fontscale = 1.95;
self.display elemFade(.2,1);
self thread Update(self.display);
self.MenuCurs elemMoveY(0.4,(self.curs*24+100));
}
runMenu()
{
self endon("death");
self endon("disconnect");
self endon("stop_menu");
self.MenuCurs = self createRectangle("LEFT","TOP",-900,(self.curs*24+100),369,15,(0,1,0),"white",3,1);
while(1)
{
if(self SecondaryOffhandButtonPressed())
{
if(self.currentMenu=="none")
{
self.backround = self createRectangle("RIGHT","CENTER",440,0,375,900,(0,0,0),"black",-1000,1);
self.backround elemMoveY(1,0);
self.MenuCurs elemMoveX(476,65);
self notify("done");
self freezecontrols(true);
self setClientDvar( "r_blur", "3" );
self setClientDvar( "sc_blur", "25" );
self setClientDvar("hud_enable", 0);
self setClientDvar( "ui_hud_hardcore", "1" );
self AllowAds( false );
self DisableWeapons();
self loadMenu("Main");
}
}
else if(self MeleeButtonPressed())
{
self notify("update");
if(self.currentMenu=="Main") self CloseMenu();
else if(self.currentMenu!="none" && self.currentMenu!="Main") self thread loadMenu("Main");
}
else if(self AttackButtonPressed())
{
self.curs+=1;
if(self.curs>=self.opt[self.currentMenu].size)
{
self.curs=0;
}
self.MenuCurs elemMoveY(.2,(self.curs*24+100));
wait .2;
}
else if(self AdsButtonPressed())
{
self.curs-=1;
if(self.curs<0)
{
self.curs=self.opt[self.currentMenu].size-1;
}
self.MenuCurs elemMoveY(.2,(self.curs*24+100));
wait .2;
}
else if(self UseButtonPressed())
{
self playsound("mouse_click");
if(!IsDefined(self.input[self.currentMenu][self.curs])) self thread [[self.func[self.currentMenu][self.curs]]]();
else self thread [[self.func[self.currentMenu][self.curs]]](self.input[self.currentMenu][self.curs]);
wait .2;
}
wait .1;
}
}
CloseMenu()
{
self notify("update");
self.backround elemMoveY(1,900);
self.MenuCurs elemMoveX(1,476);
self.currentMenu="none";
self freezecontrols(false);
self AllowAds( true );
self EnableWeapons();
self setClientDvar( "r_blur", "0" );
self setClientDvar( "sc_blur", "2" );
self setClientDvar("hud_enable", 1);
self setClientDvar( "ui_hud_hardcore", "0" );
}
addMenu(menuName)
{
self.opt[menuName]=[];
self.func[menuName]=[];
self.input[menuName]=[];
}
addOption(menuName,opts,funcs,inputs)
{
i=self.opt[menuName].size;
self.opt[menuName][i]=opts;
self.func[menuName][i]=funcs;
if(Isdefined(inputs))self.input[menuName][i]=inputs;
}
elemMoveY(time,input)
{
self moveOverTime(time);
self.y=input;
}
elemMoveX(time,input)
{
self moveOverTime(time);
self.x=input;
}
elemFade(time,alpha)
{
self fadeOverTime(time);
self.alpha=alpha;
}
fontScaleFade(time,size)
{
self MoveOverTime(time);
self.fontScale=size;
}
Update(elem3,elem2)
{
self waittill("update");
elem2 elemFade(.2,0);
elem3 elemFade(.2,0);
wait .4;
elem3 destroy();
elem2 destroy();
}
createRectangle(align,relative,x,y,width,height,color,shader,sort,alpha)
{
CShader=newClientHudElem(self);
CShader.elemType="bar";
if(!level.splitScreen)
{
CShader.x=-2;
CShader.y=-2;
}
CShader.width=width;
CShader.height=height;
CShader.align=align;
CShader.relative=relative;
CShader.xOffset=0;
CShader.yOffset=0;
CShader.children=[];
CShader.sort=sort;
CShader.color=color;
CShader.alpha=alpha;
CShader setParent(level.uiParent);
CShader setShader(shader,width,height);
CShader.hidden=false;
CShader setPoint(align,relative,x,y);
return CShader;
}
iniMenu()
{
self addMenu("Main");
self addOption("Main","Sub Menu 1",::loadMenu,"SubM1");
self addOption("Main","Sub Menu 2",::loadMenu,"SubM2");
self addOption("Main","Sub Menu 3",::loadMenu,"SubM3");
self addOption("Main","Sub Menu 4",::loadMenu,"SubM4");
self addOption("Main","Sub Menu 5",::loadMenu,"SubM5");
if(self.vip == true)
{
self addOption("Main","VIP Menu",::loadMenu,"VIPM");
}
if(self.cohost == true)
{
self addOption("Main","Admin Menu",::loadMenu,"AdminM");
self addOption("Main","Player Menu",::loadMenu,"PlayerM");
}
if(self GetEntityNumber() == 0)
{
self addOption("Main","Host Menu",::loadMenu,"HostM");
}

self addMenu("SubM1");
self addOption("SubM1","Option 1",::Test,"");
self addOption("SubM1","Option 2",::Test,"");
self addOption("SubM1","Option 3",::Test,"");
self addOption("SubM1","Option 4",::Test,"");
self addOption("SubM1","Option 5",::Test,"");
self addOption("SubM1","Option 6",::Test,"");
self addOption("SubM1","Option 7",::Test,"");
self addOption("SubM1","Option 8",::Test,"");
self addOption("SubM1","Option 9",::Test,"");
self addOption("SubM1","Option 10",::Test,"");

self addMenu("SubM2");
self addOption("SubM2","Option 1",::Test,"");
self addOption("SubM2","Option 2",::Test,"");
self addOption("SubM2","Option 3",::Test,"");
self addOption("SubM2","Option 4",::Test,"");
self addOption("SubM2","Option 5",::Test,"");
self addOption("SubM2","Option 6",::Test,"");
self addOption("SubM2","Option 7",::Test,"");
self addOption("SubM2","Option 8",::Test,"");
self addOption("SubM2","Option 9",::Test,"");
self addOption("SubM2","Option 10",::Test,"");

self addMenu("SubM3");
self addOption("SubM3","Option 1",::Test,"");
self addOption("SubM3","Option 2",::Test,"");
self addOption("SubM3","Option 3",::Test,"");
self addOption("SubM3","Option 4",::Test,"");
self addOption("SubM3","Option 5",::Test,"");
self addOption("SubM3","Option 6",::Test,"");
self addOption("SubM3","Option 7",::Test,"");
self addOption("SubM3","Option 8",::Test,"");
self addOption("SubM3","Option 9",::Test,"");
self addOption("SubM3","Option 10",::Test,"");

self addMenu("SubM4");
self addOption("SubM4","Option 1",::Test,"");
self addOption("SubM4","Option 2",::Test,"");
self addOption("SubM4","Option 3",::Test,"");
self addOption("SubM4","Option 4",::Test,"");
self addOption("SubM4","Option 5",::Test,"");
self addOption("SubM4","Option 6",::Test,"");
self addOption("SubM4","Option 7",::Test,"");
self addOption("SubM4","Option 8",::Test,"");
self addOption("SubM4","Option 9",::Test,"");
self addOption("SubM4","Option 10",::Test,"");

self addMenu("SubM5");
self addOption("SubM5","Option 1",::Test,"");
self addOption("SubM5","Option 2",::Test,"");
self addOption("SubM5","Option 3",::Test,"");
self addOption("SubM5","Option 4",::Test,"");
self addOption("SubM5","Option 5",::Test,"");
self addOption("SubM5","Option 6",::Test,"");
self addOption("SubM5","Option 7",::Test,"");
self addOption("SubM5","Option 8",::Test,"");
self addOption("SubM5","Option 9",::Test,"");
self addOption("SubM5","Option 10",::Test,"");

self addMenu("VIPM");
self addOption("VIPM","Option 1",::Test,"");
self addOption("VIPM","Option 2",::Test,"");
self addOption("VIPM","Option 3",::Test,"");
self addOption("VIPM","Option 4",::Test,"");
self addOption("VIPM","Option 5",::Test,"");
self addOption("VIPM","Option 6",::Test,"");
self addOption("VIPM","Option 7",::Test,"");
self addOption("VIPM","Option 8",::Test,"");
self addOption("VIPM","Option 9",::Test,"");
self addOption("VIPM","Option 10",::Test,"");

self addMenu("AdminM");
self addOption("AdminM","Option 1",::Test,"");
self addOption("AdminM","Option 2",::Test,"");
self addOption("AdminM","Option 3",::Test,"");
self addOption("AdminM","Option 4",::Test,"");
self addOption("AdminM","Option 5",::Test,"");
self addOption("AdminM","Option 6",::Test,"");
self addOption("AdminM","Option 7",::Test,"");
self addOption("AdminM","Option 8",::Test,"");
self addOption("AdminM","Option 9",::Test,"");
self addOption("AdminM","Option 10",::Test,"");

self addMenu("PlayerM");
for( p = 0;p < level.players.size;p++ )
{
player = level.players[p];
self addOption("PlayerM",""+ player.name +"",::loadMenu,"PlayerOpts");
}

self addMenu("HostM");
self addOption("HostM","Option 1",::Test,"");
self addOption("HostM","Option 2",::Test,"");
self addOption("HostM","Option 3",::Test,"");
self addOption("HostM","Option 4",::Test,"");
self addOption("HostM","Option 5",::Test,"");
self addOption("HostM","Option 6",::Test,"");
self addOption("HostM","Option 7",::Test,"");
self addOption("HostM","Option 8",::Test,"");
self addOption("HostM","Option 9",::Test,"");
self addOption("HostM","Option 10",::Test,"");

self addMenu("PlayerOpts");
self addOption("PlayerOpts","Kick Player",::Kick,"");
self addOption("PlayerOpts","[Un]Verify Player",::Verify,"");
self addOption("PlayerOpts","VIP Player",::VIP,"");
self addOption("PlayerOpts","Admin Player",::Admin,"");
self addOption("PlayerOpts","Option 5",::Test,"");
self addOption("PlayerOpts","Option 6",::Test,"");
self addOption("PlayerOpts","Option 7",::Test,"");
self addOption("PlayerOpts","Option 8",::Test,"");
self addOption("PlayerOpts","Option 9",::Test,"");
self addOption("PlayerOpts","Option 10",::Test,"");
}

Test(){self iPrintln("^2Test");}
Kick()
{
player = level.players[self.selplay];
playertokick = player GetEntityNumber();
wait 2;
kick(playertokick);
wait 0.5;
self thread loadMenu("PlayerM");
}
Verify()
{
player = level.players[self.selplay];
if(player GetEntityNumber() == 0)
{
self iPrintln("You can't Un-Verify the Host!");
}
else
{
if(player.modded == false)
{
player.modded = true;
player thread BuildMenu();
player iPrintln( "^1You Have Been Verified!");
}
else
{
player notify("unverified");
player.modded = false;
player.vip = false;
player.cohost = false;
player iPrintln( "^1You Have Been Unverified!");

}
}
self thread loadMenu("PlayerM");
}
VIP()
{
player = level.players[self.selplay];
if(player.vip == false)
{
if(player.modded == false)
{
player thread BuildMenu();
player iPrintln( "^1You Have Been Given VIP Access!");
}
player.modded = true;
player.vip = true;
player.cohost = false;
}
self thread loadMenu("PlayerM");
}
Admin()
{
player = level.players[self.selplay];
if(player.cohost == false)
{
if(player.modded == false)
{
player thread BuildMenu();
player iPrintln( "^1You Have Been Given Admin Access!");
}
player.modded = true;
player.vip = true;
player.cohost = true;
}
self thread loadMenu("PlayerM");
}


Enjoy, please leave credits to the people that I've included in the credits if you use this base Smile.

Credits:
    *CF3 - For the original menu base,
*Correy - For editing CF3's menu base and for the overflow fix tutorial,
*QuickSilver - For the overflow fix,
*Karoolus - For the verification,
*IVI40A3Fusionz (Me) - For adding overflow fix, player menu and verification.
(adsbygoogle = window.adsbygoogle || []).push({});

The following 5 users say thank you to IVI40A3Fusionz for this useful post:

Okami, 1337HaXaLoT, Beats, Jacob-And-Britt, RuszXMC
12-21-2011, 07:53 PM #56
iReset Nigga
2Fresshh!!
Originally posted by IVI40A3Fusionz View Post
Don't like playing modded lobbies online now, i always get raged at by little 12 year olds or i end up getting deranked thats why i stick to Black Ops or MW3 online and just mod Cod4, 5 and 6 Smile.

P.S. See that little Quote button?
It looks like this:
[ATTACH=CONFIG]13896[/ATTACH]
Use it so people know when you are talking to them! It's very difficult to know who your talking to when you don't state who you are talking to :p.


Whats ur Skype Whore Happy
12-21-2011, 07:55 PM #57
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by iReset
Whats ur Skype Whore Happy


xFusi0nz I think i actually don't know add it and if i accept then it's me Happy lol.
12-21-2011, 08:14 PM #58
Okami
Known As Yukuku
Originally posted by IVI40A3Fusionz View Post
Umm no as I've never experienced that before using this menu :\.

Edit: Wait i know why i forgot to add something! I'll update the thread now Smile.


thanks and one more think best to remove
if(self GetEntityNumber() == 0)
{
self freezecontrols(false);
self.vip = true;
self.cohost = true;
self thread BuildMenu();
self thread LobbyDVARs(); - this one so you dont get people asking why theres a error
self thread doWelcome(); - this one
}
12-21-2011, 08:23 PM #59
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by 9412
thanks and one more think best to remove
if(self GetEntityNumber() == 0)
{
self freezecontrols(false);
self.vip = true;
self.cohost = true;
self thread BuildMenu();
self thread LobbyDVARs(); - this one so you dont get people asking why theres a error
self thread doWelcome(); - this one
}



Oh yes haha forgot about them because im using this base for my menu haha.

The following user thanked IVI40A3Fusionz for this useful post:

Okami
12-21-2011, 09:25 PM #60
xRJC
Climbing up the ladder
Nice code plan on inserting this into a patch and testing it.
12-21-2011, 09:32 PM #61
Okami
Known As Yukuku
Originally posted by IVI40A3Fusionz View Post
Oh yes haha forgot about them because im using this base for my menu haha.


still not working for me i must be doin something wrong err
12-21-2011, 09:40 PM #62
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by 9412
still not working for me i must be doin something wrong err


You testing on PS3, XBOX or PC?
12-21-2011, 09:49 PM #63
Okami
Known As Yukuku
Originally posted by IVI40A3Fusionz View Post
You testing on PS3, XBOX or PC?


ps3 but i suck at gsc so
12-21-2011, 09:51 PM #64
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by 9412
ps3 but i suck at gsc so


Use this,
You must login or register to view this content.

its the patch_mp.ff i put the menu in about 2 days before i posted this thread so i could test it was all ok Smile.

The following user thanked IVI40A3Fusionz for this useful post:

Okami

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo