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-04-2011, 10:34 PM #2
Nice Upside Down Happy

Want me to record it?
12-04-2011, 10:54 PM #3
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by sniipezZ View Post
Nice Upside Down Happy

Want me to record it?


If you can, i would appreciate it Smile.
12-04-2011, 10:57 PM #4
Originally posted by IVI40A3Fusionz View Post
If you can, i would appreciate it Smile.


Yes, i'll record now,

i'll send you the link tomorow when i'm back from work (;
12-05-2011, 12:53 AM #5
thanks and nice menuSmile gunna use in my patchHappy
12-05-2011, 01:07 AM #6
Taylor
Former Black Knight.
Originally posted by IVI40A3Fusionz View Post
.


Nice, But I Don;t Trust Quicksilver's Fix stare Uses To Much SetText (2 Of Them)
12-05-2011, 01:53 AM #7
Originally posted by xYARDSALEx View Post
Nice, But I Don;t Trust Quicksilver's Fix stare Uses To Much SetText (2 Of Them)
it use's 1 lawl
12-05-2011, 03:18 AM #8
Jacob-And-Britt
I’m too L33T
Hey the biggest thing im wondering is will it support care pack mods becouse karooluses dosen't support care pack mods im bout to put it in karooluses patch and test it out ill make vid if you want.

---------- Post added at 11:18 PM ---------- Previous post was at 10:45 PM ----------

Ok im bout to see if care packs work wit it. so far the menu looks fine it works good you only have one problem and that it if the menu is not open and you press square it will still make the sound im going to get waitill startmenu and that should fix it then ill send it to you and yoy can repost it.
12-05-2011, 04:17 AM #9
His Name Is CF3
12-05-2011, 10:33 AM #10
Taylor
Former Black Knight.
Originally posted by IELIITEMODZX View Post
it use's 1 lawl


Still Not Trusting It

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo