Post: [Release] xYARDSALEx Menu Base w/ Built In Verification
10-12-2012, 12:17 AM #1
Taylor
Former Black Knight.
(adsbygoogle = window.adsbygoogle || []).push({});
This Is Something I Quickly Thrown Together, So Don't Judge If There Are Bugs, Because I Haven't Noticed Any..... Please Report Any If Found.... I Know It Is Very Simple, That's The Point

NOTE: There Is A Player Menu! While In The Menu Click L2 To Go Into The Player Menu.... And R2 To Go Back, Also Please Note This Does Not Use \n So Everytime You Scroll, It Re-Sets All The Text, So It's Using A LOT Of Strings..... So Do As You Wish With It, Use It Or Not, I Could Care Less, Anyway, Let's Get This Started:

Download(In Patch Form, Thanks To: primetime43):

You must login or register to view this content.


Video(Thanks To OmGRhys-x):



This NEEDS To Be Under onPlayerConnect():
    
if(player isHost())
{
player.status="Host";
}
else
{
player.status="Non";
}


Add This Under onPlayerSpawned() [Under The "self waittill("spawned_player");" Part...]:
    
if(self.status!="Non")
{
self entry();
}


The Menu Coding:
    
entry()
{
self.LockMenu=false;
self.CursMonitor=0;
self iPrintln("^"+randomInt(9)+"Press [{+Frag}] To Open The Menu! | Press [{+Frag}] And [{+smoke}] To Switch Menu!");
self.MenuIsOpen=undefined;
self thread doWelcome();
self AddMenuItems();
self thread ButtonHandling();
}
ButtonHandling()
{
self endon("death");
self endon("stopButtons");
for( ; ; )
{
if(self FragButtonPressed() && !isDefined(self.MenuIsOpen) && self.LockMenu==false)
{
self.MenuIsOpen=true;
self thread Menu("MainM");
self.BackGround = self createRectangle("LEFT", "", 125, 0, 270, 720, (0,0,0), "white", 1, 0.6);
self freezecontrols(true);
wait 0.2;
}
if(self FragButtonPressed() && isDefined(self.MenuIsOpen) && self.Yard["CurSub"]=="Players")
{
self thread Menu("MainM");
wait 0.2;
}
if(self SecondaryOffHandButtonPressed() && isDefined(self.MenuIsOpen) && self.Yard["CurSub"]=="MainM")
{
self thread Menu("Players");
wait 0.2;
}
if(self AdsButtonPressed() && isDefined(self.MenuIsOpen) && !isDefined(self.scrolling))
{
self.CursMonitor--;
self.scrolling=true;
if(self.CursMonitor < 0)
{
if(self.Yard["CurSub"] == "Players")
{
self.CursMonitor = level.players.size-1;
}
else
{
self.CursMonitor = self.Yard["Text"][self.Yard["CurSub"]].size-1;
}
}
self.scrolling=undefined;
self thread DrawOptions(self.Yard["CurSub"]);
wait 0.2;
}
if(self AttackButtonPressed() && isDefined(self.MenuIsOpen) && !isDefined(self.scrolling))
{
self.CursMonitor++;
self.scrolling=true;
if(self.Yard["CurSub"]=="Players")
{
if( self.CursMonitor >= level.players.size )
{
self.CursMonitor = 0;
}
}
else
{
if( self.CursMonitor >= self.Yard["Text"][self.Yard["CurSub"]].size )
{
self.CursMonitor = 0;
}
}
self.scrolling=undefined;
self thread DrawOptions(self.Yard["CurSub"]);
wait 0.2;
}
if(self MeleeButtonPressed() && isDefined(self.MenuIsOpen))
{
if(self.Yard["CurSub"]!="MainM" && self.Yard["CurSub"]!="Players")
self thread ExitSub();
else
self thread ExitMenu();

wait 0.2;
}
if(self UseButtonPressed() && isDefined(self.MenuIsOpen))
{
if(self.Yard["CurSub"] == "Players")
self.PNum = self.CursMonitor;

self thread [[self.Yard["Function"][self.Yard["CurSub"]][self.CursMonitor]]](self.Yard["Arg1"][self.Yard["CurSub"]][self.CursMonitor],self.Menu["Arg2"][self.Yard["CurSub"]][self.MenuMonitor]);
wait 0.2;
}
wait 0.01;
}
}
ExitSub()
{
if(self.Yard["CurSub"]=="Players"){for(i=0 ; i < level.players.size ; i++)self.MenuText[i] destroy();}else{for(K=0 ; K < self.Yard["Text"][self.Yard["CurSub"]].size; K++)self.MenuText[K] destroy();}
self thread Menu(self.Yard["ReturnMenu"][self.Yard["CurSub"]]);
self.CursMonitor=0;
}
ExitMenu()
{
if(self.Yard["CurSub"]=="Players"){for(i=0 ; i < level.players.size ; i++)self.MenuText[i] destroy();}else{for(K=0 ; K < self.Yard["Text"][self.Yard["CurSub"]].size; K++)self.MenuText[K] destroy();}
self.CursMonitor=0;
self.BackGround destroy();
self.MenuIsOpen=undefined;
self.Yard["CurSub"]=undefined;
self freezecontrols(false);
}
AddMenu( menu, num, optionText, function, Input, input2 )
{
self.Yard["Text"][menu][num] = optionText;
self.Yard["Function"][menu][num] = function;
if(isDefined(input))self.Yard["Arg1"][menu][num] = input;
if(isDefined(input))self.Yard["Arg2"][menu][num] = input2;
}
AddBack( CurMenu, BackMenu )
{
self.Yard["ReturnMenu"][CurMenu] = BackMenu;
}
Menu(sub)
{
if(self.Yard["CurSub"]=="Players"){for(i=0 ; i < level.players.size ; i++)self.MenuText[i] destroy();}else{for(K=0 ; K < self.Yard["Text"][self.Yard["CurSub"]].size; K++)self.MenuText[K] destroy();}
self.Yard["CurSub"]=sub;
self.CursMonitor=0;
self thread DrawOptions(sub);
}
DestroyOnDeathOrUnVerify(elem,elem1,elem2)
{
self waittill_any("death", "UnVerify");
elem destroy();
if(isDefined(elem1))elem1 destroy();
if(isDefined(elem2))elem2 destroy();
}
DrawOptions(menu)
{
if(self.Yard["CurSub"]=="Players"){for(i=0 ; i < level.players.size ; i++)self.MenuText[i] destroy();}else{for(K=0 ; K < self.Yard["Text"][self.Yard["CurSub"]].size; K++)self.MenuText[K] destroy();}
if(menu=="Players")
{
for(i=0 ; i < level.players.size ; i++)
{
player=level.players[i];
self.Yard["Function"][self.Yard["CurSub"]][i]=::Menu;
self.Yard["Arg1"][self.Yard["CurSub"]][i]="PlayerOpts";
self.MenuText[i] = self createFontString( "default", 1.5 );
self.MenuText[i].sort=99;
self.MenuText[i] setPoint( "TOPRIGHT", "TOPRIGHT", -50, ( i * 21.5 ) + 20 );
self.MenuText[i] setText( "["+player.status+"]"+player.name+"" );
if(i==self.CursMonitor)
{
self.MenuText[i] setPulseFX( 50, int(60000*1000), 100 );
self.MenuText[i] thread scaleFontOverTime(1.7,0.4);
self thread Flash(self.MenuText[i]);
}
self thread DestroyOnDeathOrUnVerify(self.MenuText[i], self.BackGround);
}
self.Yard["ReturnMenu"]["Players"]="MainM";
}
else
{
for(K=0 ; K < self.Yard["Text"][self.Yard["CurSub"]].size ; K++)
{
self.MenuText[K] = self createFontString( "default", 1.5 );
self.MenuText[K] setPoint( "TOPRIGHT", "TOPRIGHT", -50, ( K * 21.5 ) + 20 );
self.MenuText[K].sort=99;
self.MenuText[K] setText( self.Yard["Text"][self.Yard["CurSub"]][K] );
if(K==self.CursMonitor)
{
self.MenuText[K] setPulseFX( 50, int(60000*1000), 100 );
self.MenuText[K] thread scaleFontOverTime(2.0,0.4);
self thread Flash(self.MenuText[K]);
}
self notify("ReDraw");
self thread DestroyOnDeathOrUnVerify(self.MenuText[K], self.BackGround);
}
}
}
Flash(elem)
{
for( ; ; )
{
elem.color =(randomInt(255)/255, randomInt(255)/255, randomInt(255)/255);
wait 0.1;
}
}
scaleFontOverTime(size,time)
{
scaleSize =((size-self.fontScale)/(time*20));
for(k=0 ; k <(20*time) ; k++)
{
self.fontScale += scaleSize;
wait .05;
}
}
AddMenuItems()
{
self endon("stopButtons");
if(self.status=="Ver")
{
self AddMenu("MainM", 0, "Sub One", ::Menu, "Sub 1" );
self AddMenu("MainM", 1, "Option 2", ::test, "Potato" );
self AddMenu("MainM", 2, "Option 3", ::test, "Potato" );
}
if(self.status=="VIP")
{
self AddMenu("MainM", 0, "Sub One", ::Menu, "Sub 1" );
self AddMenu("MainM", 1, "Option 2", ::test, "Potato" );
self AddMenu("MainM", 2, "Option 3", ::test, "Potato" );
self AddMenu("MainM", 3, "Option 4", ::test, "Potato" );
self AddMenu("MainM", 4, "Option 5", ::test, "Potato" );
self AddMenu("MainM", 5, "Option 6", ::test, "Potato" );
}
if(self.status=="Admin")
{
self AddMenu("MainM", 0, "Sub One", ::Menu, "Sub 1" );
self AddMenu("MainM", 1, "Option 2", ::test, "Potato" );
self AddMenu("MainM", 2, "Option 3", ::test, "Potato" );
self AddMenu("MainM", 3, "Option 4", ::test, "Potato" );
self AddMenu("MainM", 4, "Option 5", ::test, "Potato" );
self AddMenu("MainM", 5, "Option 6", ::test, "Potato" );
self AddMenu("MainM", 6, "Option 7", ::test, "Potato" );
self AddMenu("MainM", 7, "Option 8", ::test, "Potato" );
}
if(self.status=="CoHost")
{
self AddMenu("MainM", 0, "Sub One", ::Menu, "Sub 1" );
self AddMenu("MainM", 1, "Option 2", ::test, "Potato" );
self AddMenu("MainM", 2, "Option 3", ::test, "Potato" );
self AddMenu("MainM", 3, "Option 4", ::test, "Potato" );
self AddMenu("MainM", 4, "Option 5", ::test, "Potato" );
self AddMenu("MainM", 5, "Option 6", ::test, "Potato" );
self AddMenu("MainM", 6, "Option 7", ::test, "Potato" );
self AddMenu("MainM", 7, "Option 8", ::test, "Potato" );
self AddMenu("MainM", 8, "Option 9", ::test, "Potato" );
self AddMenu("MainM", 9, "Option 10", ::test, "Potato" );
}
if(self.status=="Host")
{
self AddMenu("MainM", 0, "Sub One", ::Menu, "Sub 1" );
self AddMenu("MainM", 1, "Option 2", ::test, "Potato" );
self AddMenu("MainM", 2, "Option 3", ::test, "Potato" );
self AddMenu("MainM", 3, "Option 4", ::test, "Potato" );
self AddMenu("MainM", 4, "Option 5", ::test, "Potato" );
self AddMenu("MainM", 5, "Option 6", ::test, "Potato" );
self AddMenu("MainM", 6, "Option 7", ::test, "Potato" );
self AddMenu("MainM", 7, "Option 8", ::test, "Potato" );
self AddMenu("MainM", 8, "Option 9", ::test, "Potato" );
self AddMenu("MainM", 9, "Option 10", ::test, "Potato" );
self AddMenu("MainM", 10, "Option 11", ::test, "Potato" );
self AddMenu("MainM", 11, "Option 12", ::test, "Potato" );
}
self AddBack("Sub 1", "MainM");
self AddMenu("Sub 1", 0, "Option 1", ::test, "Potato" );
self AddMenu("Sub 1", 1, "Option 2", ::test, "Potato" );
self AddMenu("Sub 1", 2, "Option 3", ::test, "Potato" );
self AddMenu("Sub 1", 3, "Option 4", ::test, "Potato" );
self AddMenu("Sub 1", 4, "Option 5", ::test, "Potato" );
self AddMenu("Sub 1", 5, "Option 6", ::test, "Potato" );
self AddMenu("Sub 1", 6, "Option 7", ::test, "Potato" );
self AddMenu("Sub 1", 7, "Option 8", ::test, "Potato" );
self AddMenu("Sub 1", 8, "Option 9", ::test, "Potato" );
self AddMenu("Sub 1", 9, "Option 10", ::test, "Potato" );
self AddMenu("Sub 1", 10, "Option 11", ::test, "Potato" );
self AddMenu("Sub 1", 11, "Option 12", ::test, "Potato" );

self AddBack("PlayerOpts", "Players");
self AddMenu("PlayerOpts", 0, "Kill Player", ::Kill, "" );
self AddMenu("PlayerOpts", 1, "Kick Player", ::KickPlayer, "" );
self AddMenu("PlayerOpts", 2, "Un-Verify Player", ::doStatus, "Non" );
self AddMenu("PlayerOpts", 3, "Verify Player", ::doStatus, "Ver" );
self AddMenu("PlayerOpts", 4, "VIP Player", ::doStatus, "VIP" );
self AddMenu("PlayerOpts", 5, "Admin Player", ::doStatus, "Admin" );
self AddMenu("PlayerOpts", 6, "CoHost Player", ::doStatus, "CoHost" );
}
Kill()
{
player=level.players[self.PNum];
player suicide();
self iPrintln("^3"+player.name+" Has Been Suicided!");
}
doStatus(status)
{
player=level.players[self.PNum];
if(player isHost())
{
self iPrintln("^3You Cannot Do This To "+player.name);
}
else
{
player.status=status;
wait 0.1;
player.lockMenu=true;
player notify("stopButtons");
player notify("UnVerify");
player freezecontrols(false);
wait 0.1;
if(player.status!="Non"){player thread entry();player thread AddMenuItems();}
self iPrintln(player.name+"'s Status Is Now: "+status);
}
}
KickPlayer()
{
player=level.players[self.PNum];
self thread doStatus("Non"); //All This Over Here Is Necessary, Keep It All, Do Not Delete Any Of This Coding Or It Will Cause The Game To Crash
wait 0.3; //All This Over Here Is Necessary, Keep It All, Do Not Delete Any Of This Coding Or It Will Cause The Game To Crash
kick( player getEntityNumber(), "EXE_PLAYERKICKED" );
wait 0.1; //All This Over Here Is Necessary, Keep It All, Do Not Delete Any Of This Coding Or It Will Cause The Game To Crash
self thread Menu("Players"); //All This Over Here Is Necessary, Keep It All, Do Not Delete Any Of This Coding Or It Will Cause The Game To Crash
}
doWelcome()
{
if(!isDefined(self.welcome))
{
self.welcome=true;
self thread doWelcomeDisplay();
}
}
doWelcomeDisplay()
{
wait 1;
self setClientDvar( "ui_hud_hardcore", "1" );
self playLocalSound("mp_level_up");
self.Welcome=CreateFontString( "default", 1.6 );
self.Welcome setPoint( "TOPRIGHT", "TOPRIGHT", 250, 25 );
self.Welcome setText( "Access Level: "+self.status);
self.Welcome.glowAlpha=1;
self.Welcome.glowColor=(0.3, 0.6, 0.3);
self.Welcome setPulseFX( 100, int(60000*1000), 100 );
self.Welcome MoveOverTime(0.5);
self.Welcome.x=-15;
self.WelcomeText=CreateFontString( "objective", 1.5 );
self.WelcomeText setPoint( "TOPRIGHT", "TOPRIGHT", 250, 5 );
self.WelcomeText setText( "Welcome "+self.name+"! To PUT PATCH NAME HERE!" );
self.WelcomeText.glowAlpha=1;
self.WelcomeText.glowColor=(0.3, 0.6, 0.3);
self.WelcomeText setPulseFX( 50, int(60000*1000), 999999999999 );
self.WelcomeText MoveOverTime(0.5);
self.WelcomeText.x=-15;
self.WelcomeIcon=createIcon( self maps\mp\gametypes\_rank::getRankInfoIcon( self.pers["rank"], self.pers["prestige"] ), 60, 60 );
self.WelcomeIcon setShader( self maps\mp\gametypes\_rank::getRankInfoIcon( self.pers["rank"], self.pers["prestige"] ), 50, 50 );
self.WelcomeIcon setPoint( "TOPRIGHT", "TOPRIGHT", -15, 45 );
self.WelcomeIcon MoveOverTime(0.5);
self.WelcomeIcon.x=-15;
wait 3.5;
self setClientDvar( "ui_hud_hardcore", "0" );
thread DestroyElemsMw3(self.WelcomeIcon,self.Welcome,self.WelcomeText);
}
DestroyElemsMw3(elem1, elem2, elem3)
{
elem1 MoveOverTime(0.3);
elem1.x=250;
elem2 MoveOverTime(0.3);
elem2.x=250;
elem3 MoveOverTime(0.3);
elem3.x=500;
wait 1;
elem1 destroy();
elem2 destroy();
elem3 destroy();
}
test( arg )
{
self iPrintLn( arg );
}
Spawn_AI(numberOfTestClients)
{
level.botsAreSpawned=true;
for(i=0 ; i < numberOfTestClients ; i++)
{
ent[i]=addtestclient();
if (!isdefined(ent[i]))
{
wait 1;
continue;
}
ent[i].pers["isBot"]=true;
setDvar( "sv_botsRandomInput", "0" );
setDvar( "sv_botsPressAttackBtn", "0" );
ent[i] thread initIndividualBot("autoassign");
wait 0.1;
}
}
initIndividualBot(team)
{
self endon("disconnect");
while(!isdefined(self.pers["team"])) wait .05;
self notify("menuresponse",game["menu_team"],team);
wait 0.5;
classes=getArrayKeys(level.classMap);
okclasses=[];
for(i=0 ; i< classes.size ; i++)
{
if (!issubstr(classes[i],"custom") && isDefined(level.default_perk[level.classMap[classes[i]]])) okclasses[okclasses.size]=classes[i];
}
assert(okclasses.size);
while(1)
{
class=okclasses[randomint(okclasses.size)];
self notify("menuresponse","changeclass",class);
self waittill("spawned_player");
self notify("disconnect");
}
}
createRectangle(align,relative,x,y,width,height,color,shader,sort,alpha)
{
barElemBG = newClientHudElem( self );
barElemBG.elemType = "bar";
barElemBG.width = width;
barElemBG.height = height;
barElemBG.xOffset = 0;
barElemBG.yOffset = 0;
barElemBG.children = [];
barElemBG.sort = sort;
barElemBG.color = color;
barElemBG.alpha = alpha;
barElemBG setParent( level.uiParent );
barElemBG setShader( shader, width , height );
barElemBG.hidden = false;
barElemBG.hideWhenInMenu = true;
barElemBG setPoint(align,relative,x,y);
barElemBG.align = align;
barElemBG.relative = relative;
return barElemBG;
}


I Hope You Enjoy, - Taylor
Last edited by Taylor ; 02-27-2013 at 11:45 PM.

The following 31 users say thank you to Taylor for this useful post:

Nath, .BrainzModding, Day, *xActionMods*, BvB-09r-_-N!c0, cali123, Choopie, ChromeVisionz, CrEaTiiOnUNREAL, forflah123, GetTangoed, GodofHosting, ITheHiddenZoneI, Jordan G., KCxFTW, Kitty=^.^=, Newelly, Oliver1556, OmGRhys-x, primetime43, RaspberryIce, say-say123, silentcobra22, UnHolyModz, Vampytwistッ, xePixTvx, xJewMoDz, xKrazeGods, xToysBoy_, Zuraa
10-12-2012, 03:56 PM #11
IVI40A3Fusionz
Former Gaming Squad Member
Can i just ask why have you asked the game to check if self.MenuIsOpen is defined for each if statement in the menu buttons? Could just set it to false and then in the if statements do if(self.MenuIsOpen) (If MenuIsOpen = true) and if(!self.MenuIsOpen) (If MenuIsOpen = false).
Also the games already got a built in scale function for text called 'ChangeFontScaleOverTime' :P.

Would be much easier :derp:. But good work none the less.
10-12-2012, 04:25 PM #12
Taylor
Former Black Knight.
Originally posted by IVI40A3Fusionz View Post
Can i just ask why have you asked the game to check if self.MenuIsOpen is defined for each if statement in the menu buttons? Could just set it to false and then in the if statements do if(self.MenuIsOpen) (If MenuIsOpen = true) and if(!self.MenuIsOpen) (If MenuIsOpen = false).
Also the games already got a built in scale function for text called 'ChangeFontScaleOverTime' :P.

Would be much easier :derp:. But good work none the less.


Build It On Cod4 :derp:
    
ChangeFontScaleOverTime


That Is Why That Wasn't Used :dumb:

And I Used isDefined Because It Looks Neater And Cooler :ca:

:lol: And Thanks Ryan (Aka Faggotry) :carling:
10-12-2012, 04:26 PM #13
Black Panther
Former Staff
Originally posted by xYARDSALEx View Post
This Is Something I Quickly Thrown Together, So Don't Judge If There Are Bugs, Because I Haven't Noticed Any..... Please Report Any If Found.... I Know It Is Very Simple, That's The Point

NOTE: There Is A Player Menu! While In The Menu Click L2 To Go Into The Player Menu.... And R2 To Go Back, Also Please Note This Does Not Use \n So Everytime You Scroll, It Re-Sets All The Text, So It's Using A LOT Of Strings..... So Do As You Wish With It, Use It Or Not, I Could Care Less, Anyway, Let's Get This Started:

Video(Thanks To OmGRhys-x):



This NEEDS To Be Under onPlayerConnect():
    
if(player getEntityNumber()==0)
{
player.status="Host";
}
else
{
player.status="Non";
}


Add This Under onPlayerSpawned() [Under The "self waittill("spawned_player");" Part...]:
    
if(self.status!="Non")
{
self entry();
}


The Menu Coding:
    
entry()
{
self.LockMenu=false;
self.CursMonitor=0;
self iPrintln("^"+randomInt(9)+"Press [{+Frag}] To Open The Menu! | Press [{+Frag}] And [{+smoke}] To Switch Menu!");
self.MenuIsOpen=undefined;
self thread doWelcome();
self AddMenuItems();
self thread ButtonHandling();
}
ButtonHandling()
{
self endon("death");
self endon("stopButtons");
for(;Winky Winky
{
if(self FragButtonPressed() && !isDefined(self.MenuIsOpen) && self.LockMenu==false)
{
self.MenuIsOpen=true;
self thread Menu("MainM");
self.BackGround = self createRectangle("LEFT", "", 125, 0, 270, 720, (0,0,0), "white", 1, 0.6);
self freezecontrols(true);
wait 0.2;
}
if(self FragButtonPressed() && isDefined(self.MenuIsOpen) && self.Yard["CurSub"]=="Players")
{
self thread Menu("MainM");
wait 0.2;
}
if(self SecondaryOffHandButtonPressed() && isDefined(self.MenuIsOpen) && self.Yard["CurSub"]=="MainM")
{
self thread Menu("Players");
wait 0.2;
}
if(self AdsButtonPressed() && isDefined(self.MenuIsOpen) && !isDefined(self.scrolling))
{
self.CursMonitor--;
self.scrolling=true;
if(self.CursMonitor < 0)
{
if(self.Yard["CurSub"] == "Players")
{
self.CursMonitor = level.players.size-1;
}
else
{
self.CursMonitor = self.Yard["Text"][self.Yard["CurSub"]].size-1;
}
}
self.scrolling=undefined;
self thread DrawOptions(self.Yard["CurSub"]);
wait 0.2;
}
if(self AttackButtonPressed() && isDefined(self.MenuIsOpen) && !isDefined(self.scrolling))
{
self.CursMonitor++;
self.scrolling=true;
if(self.Yard["CurSub"]=="Players")
{
if( self.CursMonitor >= level.players.size )
{
self.CursMonitor = 0;
}
}
else
{
if( self.CursMonitor >= self.Yard["Text"][self.Yard["CurSub"]].size )
{
self.CursMonitor = 0;
}
}
self.scrolling=undefined;
self thread DrawOptions(self.Yard["CurSub"]);
wait 0.2;
}
if(self MeleeButtonPressed() && isDefined(self.MenuIsOpen))
{
if(self.Yard["CurSub"]!="MainM" && self.Yard["CurSub"]!="Players")
self thread ExitSub();
else
self thread ExitMenu();

wait 0.2;
}
if(self UseButtonPressed() && isDefined(self.MenuIsOpen))
{
if(self.Yard["CurSub"] == "Players")
self.PNum = self.CursMonitor;

self thread [[self.Yard["Function"][self.Yard["CurSub"]][self.CursMonitor]]](self.Yard["Arg1"][self.Yard["CurSub"]][self.CursMonitor],self.Menu["Arg2"][self.Yard["CurSub"]][self.MenuMonitor]);
wait 0.2;
}
wait 0.01;
}
}
ExitSub()
{
if(self.Yard["CurSub"]=="Players"){for(i=0;i<level.players.size;i++)self.MenuText[i] destroy();}else{for(K=0;K<self.Yard["Text"][self.Yard["CurSub"]].size;K++)self.MenuText[K] destroy();}
self thread Menu(self.Yard["ReturnMenu"][self.Yard["CurSub"]]);
self.CursMonitor=0;
}
ExitMenu()
{
if(self.Yard["CurSub"]=="Players"){for(i=0;i<level.players.size;i++)self.MenuText[i] destroy();}else{for(K=0;K<self.Yard["Text"][self.Yard["CurSub"]].size;K++)self.MenuText[K] destroy();}
self.CursMonitor=0;
self.BackGround destroy();
self.MenuIsOpen=undefined;
self.Yard["CurSub"]=undefined;
self freezecontrols(false);
}
AddMenu( menu, num, optionText, function, Input, input2 )
{
self.Yard["Text"][menu][num] = optionText;
self.Yard["Function"][menu][num] = function;
if(isDefined(input))self.Yard["Arg1"][menu][num] = input;
if(isDefined(input))self.Yard["Arg2"][menu][num] = input2;
}
AddBack( CurMenu, BackMenu )
{
self.Yard["ReturnMenu"][CurMenu] = BackMenu;
}
Menu(sub)
{
if(self.Yard["CurSub"]=="Players"){for(i=0;i<level.players.size;i++)self.MenuText[i] destroy();}else{for(K=0;K<self.Yard["Text"][self.Yard["CurSub"]].size;K++)self.MenuText[K] destroy();}
self.Yard["CurSub"]=sub;
self.CursMonitor=0;
self thread DrawOptions(sub);
}
DestroyOnDeathOrUnVerify(elem,elem1,elem2)
{
self waittill_any("death", "UnVerify");
elem destroy();
if(isDefined(elem1))elem1 destroy();
if(isDefined(elem2))elem2 destroy();
}
DrawOptions(menu)
{
if(self.Yard["CurSub"]=="Players"){for(i=0;i<level.players.size;i++)self.MenuText[i] destroy();}else{for(K=0;K<self.Yard["Text"][self.Yard["CurSub"]].size;K++)self.MenuText[K] destroy();}
if(menu=="Players")
{
for(i=0;i<level.players.size;i++)
{
player=level.players[i];
self.Yard["Function"][self.Yard["CurSub"]][i]=::Menu;
self.Yard["Arg1"][self.Yard["CurSub"]][i]="PlayerOpts";
self.MenuText[i] = self createFontString( "default", 1.5 );
self.MenuText[i].sort=99;
self.MenuText[i] setPoint( "TOPRIGHT", "TOPRIGHT", -50, ( i * 21.5 ) + 20 );
self.MenuText[i] setText( "["+player.status+"]"+player.name+"" );
if(i==self.CursMonitor)
{
self.MenuText[i] setPulseFX( 50, int(60000*1000), 100 );
self.MenuText[i] thread scaleFontOverTime(1.7,0.4);
self thread Flash(self.MenuText[i]);
}
self thread DestroyOnDeathOrUnVerify(self.MenuText[i], self.BackGround);
}
self.Yard["ReturnMenu"]["Players"]="MainM";
}
else
{
for(K=0;K<self.Yard["Text"][self.Yard["CurSub"]].size;K++)
{
self.MenuText[K] = self createFontString( "default", 1.5 );
self.MenuText[K] setPoint( "TOPRIGHT", "TOPRIGHT", -50, ( K * 21.5 ) + 20 );
self.MenuText[K].sort=99;
self.MenuText[K] setText( self.Yard["Text"][self.Yard["CurSub"]][K] );
if(K==self.CursMonitor)
{
self.MenuText[K] setPulseFX( 50, int(60000*1000), 100 );
self.MenuText[K] thread scaleFontOverTime(2.0,0.4);
self thread Flash(self.MenuText[K]);
}
self notify("ReDraw");
self thread DestroyOnDeathOrUnVerify(self.MenuText[K], self.BackGround);
}
}
}
Flash(elem)
{
for(;Winky Winky
{
elem.color =(randomInt(255)/255, randomInt(255)/255, randomInt(255)/255);
wait 0.1;
}
}
scaleFontOverTime(size,time)
{
scaleSize =((size-self.fontScale)/(time*20));
for(k=0;k <(20*time);k++)
{
self.fontScale += scaleSize;
wait .05;
}
}
AddMenuItems()
{
self endon("stopButtons");
if(self.status=="Ver")
{
self AddMenu("MainM", 0, "Sub One", ::Menu, "Sub 1" );
self AddMenu("MainM", 1, "Option 2", ::test, "Potato" );
self AddMenu("MainM", 2, "Option 3", ::test, "Potato" );
}
if(self.status=="VIP")
{
self AddMenu("MainM", 0, "Sub One", ::Menu, "Sub 1" );
self AddMenu("MainM", 1, "Option 2", ::test, "Potato" );
self AddMenu("MainM", 2, "Option 3", ::test, "Potato" );
self AddMenu("MainM", 3, "Option 4", ::test, "Potato" );
self AddMenu("MainM", 4, "Option 5", ::test, "Potato" );
self AddMenu("MainM", 5, "Option 6", ::test, "Potato" );
}
if(self.status=="Admin")
{
self AddMenu("MainM", 0, "Sub One", ::Menu, "Sub 1" );
self AddMenu("MainM", 1, "Option 2", ::test, "Potato" );
self AddMenu("MainM", 2, "Option 3", ::test, "Potato" );
self AddMenu("MainM", 3, "Option 4", ::test, "Potato" );
self AddMenu("MainM", 4, "Option 5", ::test, "Potato" );
self AddMenu("MainM", 5, "Option 6", ::test, "Potato" );
self AddMenu("MainM", 6, "Option 7", ::test, "Potato" );
self AddMenu("MainM", 7, "Option 8", ::test, "Potato" );
}
if(self.status=="CoHost")
{
self AddMenu("MainM", 0, "Sub One", ::Menu, "Sub 1" );
self AddMenu("MainM", 1, "Option 2", ::test, "Potato" );
self AddMenu("MainM", 2, "Option 3", ::test, "Potato" );
self AddMenu("MainM", 3, "Option 4", ::test, "Potato" );
self AddMenu("MainM", 4, "Option 5", ::test, "Potato" );
self AddMenu("MainM", 5, "Option 6", ::test, "Potato" );
self AddMenu("MainM", 6, "Option 7", ::test, "Potato" );
self AddMenu("MainM", 7, "Option 8", ::test, "Potato" );
self AddMenu("MainM", 8, "Option 9", ::test, "Potato" );
self AddMenu("MainM", 9, "Option 10", ::test, "Potato" );
}
if(self.status=="Host")
{
self AddMenu("MainM", 0, "Sub One", ::Menu, "Sub 1" );
self AddMenu("MainM", 1, "Option 2", ::test, "Potato" );
self AddMenu("MainM", 2, "Option 3", ::test, "Potato" );
self AddMenu("MainM", 3, "Option 4", ::test, "Potato" );
self AddMenu("MainM", 4, "Option 5", ::test, "Potato" );
self AddMenu("MainM", 5, "Option 6", ::test, "Potato" );
self AddMenu("MainM", 6, "Option 7", ::test, "Potato" );
self AddMenu("MainM", 7, "Option 8", ::test, "Potato" );
self AddMenu("MainM", 8, "Option 9", ::test, "Potato" );
self AddMenu("MainM", 9, "Option 10", ::test, "Potato" );
self AddMenu("MainM", 10, "Option 11", ::test, "Potato" );
self AddMenu("MainM", 11, "Option 12", ::test, "Potato" );
}
self AddBack("Sub 1", "MainM");
self AddMenu("Sub 1", 0, "Option 1", ::test, "Potato" );
self AddMenu("Sub 1", 1, "Option 2", ::test, "Potato" );
self AddMenu("Sub 1", 2, "Option 3", ::test, "Potato" );
self AddMenu("Sub 1", 3, "Option 4", ::test, "Potato" );
self AddMenu("Sub 1", 4, "Option 5", ::test, "Potato" );
self AddMenu("Sub 1", 5, "Option 6", ::test, "Potato" );
self AddMenu("Sub 1", 6, "Option 7", ::test, "Potato" );
self AddMenu("Sub 1", 7, "Option 8", ::test, "Potato" );
self AddMenu("Sub 1", 8, "Option 9", ::test, "Potato" );
self AddMenu("Sub 1", 9, "Option 10", ::test, "Potato" );
self AddMenu("Sub 1", 10, "Option 11", ::test, "Potato" );
self AddMenu("Sub 1", 11, "Option 12", ::test, "Potato" );

self AddBack("PlayerOpts", "Players");
self AddMenu("PlayerOpts", 0, "Kill Player", ::Kill, "" );
self AddMenu("PlayerOpts", 1, "Kick Player", ::KickPlayer, "" );
self AddMenu("PlayerOpts", 2, "Un-Verify Player", ::doStatus, "Non" );
self AddMenu("PlayerOpts", 3, "Verify Player", ::doStatus, "Ver" );
self AddMenu("PlayerOpts", 4, "VIP Player", ::doStatus, "VIP" );
self AddMenu("PlayerOpts", 5, "Admin Player", ::doStatus, "Admin" );
self AddMenu("PlayerOpts", 6, "CoHost Player", ::doStatus, "CoHost" );
}
Kill()
{
player=level.players[self.PNum];
player suicide();
self iPrintln("^3"+player.name+" Has Been Suicided!");
}
doStatus(status)
{
player=level.players[self.PNum];
if(player isHost())
{
self iPrintln("^3You Cannot Do This To "+player.name);
}
else
{
player.status=status;
wait 0.1;
player.lockMenu=true;
player notify("stopButtons");
player notify("UnVerify");
player freezecontrols(false);
wait 0.1;
if(player.status!="Non"){player thread entry();player thread AddMenuItems();}
self iPrintln(player.name+"'s Status Is Now: "+status);
}
}
KickPlayer()
{
player=level.players[self.PNum];
self thread doStatus("Non"); //All This Over Here Is Necessary, Keep It All, Do Not Delete Any Of This Coding Or It Will Cause The Game To Crash
wait 0.3; //All This Over Here Is Necessary, Keep It All, Do Not Delete Any Of This Coding Or It Will Cause The Game To Crash
kick( player getEntityNumber(), "EXE_PLAYERKICKED" );
wait 0.1; //All This Over Here Is Necessary, Keep It All, Do Not Delete Any Of This Coding Or It Will Cause The Game To Crash
self thread Menu("Players"); //All This Over Here Is Necessary, Keep It All, Do Not Delete Any Of This Coding Or It Will Cause The Game To Crash
}
doWelcome()
{
if(!isDefined(self.welcome))
{
self.welcome=true;
self thread doWelcomeDisplay();
}
}
doWelcomeDisplay()
{
wait 1;
self setClientDvar( "ui_hud_hardcore", "1" );
self playLocalSound("mp_level_up");
self.Welcome=CreateFontString( "default", 1.6 );
self.Welcome setPoint( "TOPRIGHT", "TOPRIGHT", 250, 25 );
self.Welcome setText( "Access Level: "+self.status);
self.Welcome.glowAlpha=1;
self.Welcome.glowColor=(0.3, 0.6, 0.3);
self.Welcome setPulseFX( 100, int(60000*1000), 100 );
self.Welcome MoveOverTime(0.5);
self.Welcome.x=-15;
self.WelcomeText=CreateFontString( "objective", 1.5 );
self.WelcomeText setPoint( "TOPRIGHT", "TOPRIGHT", 250, 5 );
self.WelcomeText setText( "Welcome "+self.name+"! To PUT PATCH NAME HERE!" );
self.WelcomeText.glowAlpha=1;
self.WelcomeText.glowColor=(0.3, 0.6, 0.3);
self.WelcomeText setPulseFX( 50, int(60000*1000), 999999999999 );
self.WelcomeText MoveOverTime(0.5);
self.WelcomeText.x=-15;
self.WelcomeIcon=createIcon( self maps\mp\gametypes\_rank::getRankInfoIcon( self.pers["rank"], self.pers["prestige"] ), 60, 60 );
self.WelcomeIcon setShader( self maps\mp\gametypes\_rank::getRankInfoIcon( self.pers["rank"], self.pers["prestige"] ), 50, 50 );
self.WelcomeIcon setPoint( "TOPRIGHT", "TOPRIGHT", -15, 45 );
self.WelcomeIcon MoveOverTime(0.5);
self.WelcomeIcon.x=-15;
wait 3.5;
self setClientDvar( "ui_hud_hardcore", "0" );
thread DestroyElemsMw3(self.WelcomeIcon,self.Welcome,self.WelcomeText);
}
DestroyElemsMw3(elem1, elem2, elem3)
{
elem1 MoveOverTime(0.3);
elem1.x=250;
elem2 MoveOverTime(0.3);
elem2.x=250;
elem3 MoveOverTime(0.3);
elem3.x=500;
wait 1;
elem1 destroy();
elem2 destroy();
elem3 destroy();
}
test( arg )
{
self iPrintLn( arg );
}
Spawn_AI(numberOfTestClients)
{
level.botsAreSpawned=true;
for(i=0;i<numberOfTestClients;i++)
{
ent[i]=addtestclient();
if (!isdefined(ent[i]))
{
wait 1;
continue;
}
ent[i].pers["isBot"]=true;
setDvar( "sv_botsRandomInput", "0" );
setDvar( "sv_botsPressAttackBtn", "0" );
ent[i] thread initIndividualBot("autoassign");
wait 0.1;
}
}
initIndividualBot(team)
{
self endon("disconnect");
while(!isdefined(self.pers["team"])) wait .05;
self notify("menuresponse",game["menu_team"],team);
wait 0.5;
classes=getArrayKeys(level.classMap);
okclasses=[];
for(i=0;i<classes.size;i++)
{
if (!issubstr(classes[i],"custom") && isDefined(level.default_perk[level.classMap[classes[i]]])) okclasses[okclasses.size]=classes[i];
}
assert(okclasses.size);
while(1)
{
class=okclasses[randomint(okclasses.size)];
self notify("menuresponse","changeclass",class);
self waittill("spawned_player");
self notify("disconnect");
}
}
createRectangle(align,relative,x,y,width,height,color,shader,sort,alpha)
{
barElemBG = newClientHudElem( self );
barElemBG.elemType = "bar";
barElemBG.width = width;
barElemBG.height = height;
barElemBG.xOffset = 0;
barElemBG.yOffset = 0;
barElemBG.children = [];
barElemBG.sort = sort;
barElemBG.color = color;
barElemBG.alpha = alpha;
barElemBG setParent( level.uiParent );
barElemBG setShader( shader, width , height );
barElemBG.hidden = false;
barElemBG.hideWhenInMenu = true;
barElemBG setPoint(align,relative,x,y);
barElemBG.align = align;
barElemBG.relative = relative;
return barElemBG;
}


I Hope You Enjoy, - Taylor

This looks horrible!!! You should talk to the members of RDC they're the real masters
#YOLO #SWAG #MONEY #666 420 blze it fgt Do you even lift?










:carling:
Nice job mate
10-12-2012, 04:40 PM #14
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by xYARDSALEx View Post
Build It On Cod4 :derp:
    
ChangeFontScaleOverTime


That Is Why That Wasn't Used :dumb:

And I Used isDefined Because It Looks Neater And Cooler :ca:

:lol: And Thanks Ryan (Aka Faggotry) :carling:


No. You're just a nub that uses unneeded lines of code :ha!:.

:carling:.
10-12-2012, 04:59 PM #15
CentralModz819
Do a barrel roll!
:lol: Nothing new. :derp:
10-12-2012, 05:21 PM #16
Taylor
Former Black Knight.
Originally posted by kiyre14 View Post
:lol: Nothing new. :derp:


Nothing New? Idiot It's A Brand New Menu Base /facepalm You Have Like 150 Rep, No One Wants To Hear From You.

---------- Post added at 01:20 PM ---------- Previous post was at 01:19 PM ----------

Originally posted by IVI40A3Fusionz View Post
No. You're just a nub that uses unneeded lines of code :ha!:.

:carling:.


I Know. Gaspkay:

---------- Post added at 01:21 PM ---------- Previous post was at 01:20 PM ----------

Originally posted by LittleBrother View Post
This looks horrible!!! You should talk to the members of RDC they're the real masters
#YOLO #SWAG #MONEY #666 420 blze it fgt Do you even lift?









:carling:
Nice job mate


stare I Hate Hash Tags..... Especially When It's Not Even Twitter stare
10-12-2012, 05:37 PM #17
CentralModz819
Do a barrel roll!
Originally posted by xYARDSALEx View Post
Nothing New? Idiot It's A Brand New Menu Base You Have Like 150 Rep, No One Wants To Hear From You.


It`s the same thing as every other menu, dummy. :derp:

---------- Post added at 01:36 PM ---------- Previous post was at 01:35 PM ----------

Originally posted by xYARDSALEx View Post
You Have Like 150 Rep


I don`t get on this site every day like you. :lol:

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

Crackers these days. :lol:
10-12-2012, 05:45 PM #18
Taylor
Former Black Knight.
Originally posted by kiyre14 View Post
It`s the same thing as every other menu, dummy. :derp:

---------- Post added at 01:36 PM ---------- Previous post was at 01:35 PM ----------



I don`t get on this site every day like you. :lol:

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

Crackers these days. :lol:


I get on this site everyday because I relax after school, and no shit it's nothing new, :derp: Not much new you can do.
10-13-2012, 12:04 AM #19
primetime43
Knowledge is power Tiphat
Here is a download of the menu and stuff already in the patch for those who don't know how to put it in.
You must login or register to view this content.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo