Post: Clean Mod Menu
08-12-2012, 11:13 PM #1
AlabamaHit
ROLL TIDE!!!
(adsbygoogle = window.adsbygoogle || []).push({}); Firstly thanks/credit to everyones patches/codes I have looked at. Literally don't remember everyone I have looked at a lot.
This is just a clean menu. I personally think it is the cleanest looking one.
I haven't had any error with text not displaying and the way I colored the text makes it easy to see in dark or light locations.
When you are not highlighted the text is white. When you scroll with the white bar the highlighted text changes to Black making it easy to see.

When in menu you have god mode. So you will need to use the god mode posted to make it all work together right.

On player Spawn:
    
self thread BuildMenu();


Menu:
    
BuildMenu()
{
self notify("update");
self thread iniMenu();
self.MenuOpen = false;
self.Menu["Background"] = CreateShader("CENTER", "CENTER", 850, 0, 290, 1000, (0,0,0), "white", 0, .225);
self.Menu["Scrollbar"] = CreateShader("CENTER", "CENTER", 850, -160, 290, 20, (255,250,250), "white", 0, 1);
for(;Winky Winky
{
if(self ActionSlotTwoButtonPressed() && self.MenuOpen == false && !self.lockMenu)
{
self freezecontrols(true);
if(IsSplitScreen()){}else{self setclientdvars("cg_drawcrosshair", "0", "ui_hud_hardcore", "1", "r_blur", "6");}
self EnableHealthShield( true );
self EnableInvulnerability();
self.maxhealth = 99999;
self.health = self.maxhealth;
self.godM = true;
self.Menu["Scrollbar"] MoveElem("x", 1, 250);
self.Menu["Background"] MoveElem("x", 1, 250);
wait .5;
self thread MenuText("Main");
wait .8;
self.Menu["Cursor"] = 0;
self.Menu["Scrollbar"] MoveElem("y", .1, self.Menu["Cursor"]*24-160);
self.Menu["MenuText"][self.Menu["Cursor"]].color = (0,0,0);
self.MenuOpen = true;
wait .1;
}
if(self UseButtonPressed() && self.MenuOpen == true)
{
if(!IsDefined(self.MenuInput[self.Root][self.Menu["Cursor"]]))
{
self thread [[self.MenuFunction[self.Root][self.Menu["Cursor"]]]]();
}
else
{
self thread [[self.MenuFunction[self.Root][self.Menu["Cursor"]]]](self.MenuInput[self.Root][self.Menu["Cursor"]]);
}
wait .2;
}
if(self AdsButtonPressed() && self.MenuOpen == true)
{
self.Menu["Cursor"]--;
if(self.Menu["Cursor"]>self.MenuText[self.Root].size-1) self.Menu["Cursor"]=0; self.Menu["MenuText"][self.MenuText[self.Root].size-1].color = (255,250,250);
if(self.Menu["Cursor"]<0) self.Menu["Cursor"]=self.MenuText[self.Root].size-1; self.Menu["MenuText"][0].color = (255,250,250);
self.Menu["MenuText"][self.Menu["Cursor"]+1].color = (255,250,250);
self.Menu["MenuText"][self.Menu["Cursor"]].color = (0,0,0);
self.Menu["Scrollbar"] MoveElem("y", .1, self.Menu["Cursor"]*24-160);
wait .2;
}
if(self AttackButtonPressed() && self.MenuOpen == true)
{
self.Menu["Cursor"]++;
if(self.Menu["Cursor"]>self.MenuText[self.Root].size-1) self.Menu["Cursor"]=0; self.Menu["MenuText"][self.MenuText[self.Root].size-1].color = (255,250,250);
if(self.Menu["Cursor"]<0) self.Menu["Cursor"]=self.MenuText[self.Root].size-1; self.Menu["MenuText"][0].color = (255,250,250);
self.Menu["MenuText"][self.Menu["Cursor"]-1].color = (255,250,250);
self.Menu["MenuText"][self.Menu["Cursor"]].color = (0,0,0);
self.Menu["Scrollbar"] MoveElem("y", .1, self.Menu["Cursor"]*24-160);
wait .2;
}
if(self MeleeButtonPressed() && self.MenuOpen == true)
{
if(self.Root == "Main")
{
self.Menu["Scrollbar"] MoveElem("x", 1, 850);
self.Menu["Background"] MoveElem("x", 1, 850);
self.Menu["MenuText"] MoveElem("x", .985, 450);
self notify("menu_exit");
self notify("update");
wait 1;
self.Menu["MenuText"] destroy();
self freezecontrols(false);
if(IsSplitScreen()){}else{self setClientDvars( "cg_drawcrosshair", "1", "r_blur", "0", "ui_hud_hardcore", "0" );}
if(self.god == false)
{
wait 2;
self EnableHealthShield( false );
self DisableInvulnerability();
self.maxhealth = 100;
self.health = self.maxhealth;
}
self.godM = false;
self.MenuOpen = false;
}
else if(self.Root == "Zombie")
{
self notify("update");
self thread NewMenu("Main");
}
wait .2;
}
wait 0.05;
}
}


CreateShader(align,relative,x,y,width,height,color,shader,sort,alpha)
{
CShader=newClientHudElem(self);
CShader.children=[];
CShader.elemType="bar";
CShader.sort=sort;
CShader.color=color;
CShader.alpha=alpha;
CShader setParent(level.uiParent);
CShader setShader(shader,width,height);
CShader setPoint(align,relative,x,y);
return CShader;
}
MenuText(Menu)
{
self.Root = Menu;
for( i=0;i<self.MenuText[Menu].size;i++ )
{
self.Menu["MenuText"][i] = createFontString("hud_small", 1.4, self);
self.Menu["MenuText"][i] setPoint( "LEFT", "", 200, i*24-160);
self.Menu["MenuText"][i] setText( self.MenuText[Menu][i] );
self.Menu["MenuText"][i].alpha = 6;
self.Menu["MenuText"][i].sort = 15;
self.Menu["MenuText"][i] elemFade(.1,1);
self thread Update(self.Menu["MenuText"][i]);
}
}
elemFade(time,alpha)
{
self fadeOverTime(time);
self.alpha=alpha;
}
Update(elem3,elem2)
{
self waittill("update");
elem2 elemFade(.2,.5);
elem3 elemFade(.2,.5);
wait .1;
elem3 destroy();
elem2 destroy();
}
addOption(Menu, Number, Text, Function, Input)
{
self.MenuText[Menu][Number] = Text;
self.MenuFunction[Menu][Number] = Function;
if(IsDefined(Input)) self.MenuInput[Menu][Number] = Input;
}
MoveElem(Axis, Time, Input)
{
self MoveOverTime(Time);
if(Axis == "x") self.x = Input;
else self.y = Input;
}
addMenu(Menu, Title)
{
self.TitleText[Menu] = Title;
}
NewMenu(Menu)
{
self notify("update");
self.Menu["MenuText"] destroy();
self thread MenuText(Menu);
self.Menu["MenuText"].x = 60;
self.Menu["Cursor"] = 0;
self.Menu["MenuText"][self.Menu["Cursor"]].color = (0,0,0);
self.Menu["Scrollbar"] MoveElem("y", .1, self.Menu["Cursor"]*24-160);
}
iniMenu()
{
addMenu("Main", "Main Menu");
addOption("Main", 0, "Zombie Stuff", ::NewMenu, "Zombie");


addMenu("Zombie", "Zombie Stuff");
addOption("Zombie", 0, "Make Zombies Dance", ::zombiesDance);
addOption("Zombie", 1, "Swap Teams", ::teamS);
addOption("Zombie", 2, "Toggle God Mode", ::toggleGod);
}


Functions Needed:
    
teamS()
{
self endon ("disconnect");
self endon("death");
self endon("stop_teamS");
if(self.team == "allies"){ self.team = "axis"; } else { self.team = "allies"; }
self iPrintlnBold("Now on the Other Team!");
self notify("stop_teamS");
}

zombiesDance()
{
self endon("disconnect");
self endon("death");
self endon("stop_dance");
if(self.zombie_dance == false)
{
self iPrintlnBold( "Zombie Are: ^5Dancing" );
self.zombie_dance = true;
for(;Winky Winky
{
zombies = GetAiSpeciesArray( "axis", "all" );
for( i = 0;i < zombies.size;i++ )
{
if(zombies.size == 1){self.zombie_dance = false; self notify("stop_dance");}//This is to turn it off with last zombie. If we don't it will cause some lag. We don't like lag!.
zombies[i] allowedStances( "crouch" );
wait .1;
}
}
}
else
{
self iPrintlnBold( "Zombie Are: ^5Not Dancing" );
self.zombie_dance = false;
zombies = GetAiSpeciesArray( "axis", "all" );
for( i = 0;i < zombies.size;i++ )
{
zombies[i] allowedStances( "stand" );
}
self notify("stop_dance");
}
}

toggleGod()
{
self endon("disconnect");
self endon("death");
self endon("stop_god");
if(self.god == false)
{
self EnableHealthShield( true );
self EnableInvulnerability();
self.maxhealth = 99999;
self.health = self.maxhealth;
self iPrintlnBold("God Mode: ^5On");
self.god = true;
}
else
{
if(self.godM == false)
{
self EnableHealthShield( false );
self DisableInvulnerability();
self.maxhealth = 100;
self.health = self.maxhealth;
}
self iPrintlnBold("God Mode: ^5Off");
self.god = false;
}
self notify("stop_god");
}





I don't have a recorder so if someone wants to record it I will place video here and give credits.

With this menu you press:
"Down" to open it
"X" to select
"Melee" is back
"Triggers" are up and down.

I took out of my patch and removed some codes. So if any errors please let me know, I think it is good to go though.

This will work on any TU.....
Last edited by AlabamaHit ; 08-12-2012 at 11:18 PM.

The following user thanked AlabamaHit for this useful post:

04jberry
08-12-2012, 11:15 PM #2
Jango
I love my kitteh
Good job Smile
Last edited by Jango ; 08-12-2012 at 11:30 PM.
08-12-2012, 11:17 PM #3
ICS Vortex
Between Light and Lies
Originally posted by Jango View Post
Next time please let us know if it is 1.13 or 1.11. I am thinking it is 1.11 but I don't code so I am not for sure.


This is Black Ops :lol:

The following user thanked ICS Vortex for this useful post:

04jberry
08-12-2012, 11:30 PM #4
Jango
I love my kitteh
Originally posted by ICS
This is Black Ops :lol:


I feel like a dumbass now Gaspkay:
08-16-2012, 12:16 PM #5
maybe try get a recorder so we can see what it is like?
Last edited by Silent Assassin ; 08-16-2012 at 12:19 PM.
08-18-2012, 09:03 PM #6
AlabamaHit
ROLL TIDE!!!
I thought someone would have done a video or something of it already..
08-19-2012, 01:08 AM #7
Choco
Respect my authoritah!!
Originally posted by AlabamaHit View Post
.


These bits right here:

    if(IsSplitScreen()){}else{self setclientdvars("cg_drawcrosshair", "0", "ui_hud_hardcore", "1", "r_blur", "6");}

if(IsSplitScreen()){}else{self setClientDvars( "cg_drawcrosshair", "1", "r_blur", "0", "ui_hud_hardcore", "0" );}


That's an inefficient way of doing things. Just do this:

    if(!isSplitScreen()){self setClientDvars("cg_drawcrosshair", "0", "ui_hud_hardcore", "1", "r_blur", "6");}

if(!IsSplitScreen()){self setClientDvars( "cg_drawcrosshair", "1", "r_blur", "0", "ui_hud_hardcore", "0" );}


Also, this here:

    if(self AdsButtonPressed() && self.MenuOpen == true)
{
self.Menu["Cursor"]--;
if(self.Menu["Cursor"]>self.MenuText[self.Root].size-1) self.Menu["Cursor"]=0; self.Menu["MenuText"][self.MenuText[self.Root].size-1].color = (255,250,250);
if(self.Menu["Cursor"]<0) self.Menu["Cursor"]=self.MenuText[self.Root].size-1; self.Menu["MenuText"][0].color = (255,250,250);
self.Menu["MenuText"][self.Menu["Cursor"]+1].color = (255,250,250);
self.Menu["MenuText"][self.Menu["Cursor"]].color = (0,0,0);
self.Menu["Scrollbar"] MoveElem("y", .1, self.Menu["Cursor"]*24-160);
wait .2;
}
if(self AttackButtonPressed() && self.MenuOpen == true)
{
self.Menu["Cursor"]++;
if(self.Menu["Cursor"]>self.MenuText[self.Root].size-1) self.Menu["Cursor"]=0; self.Menu["MenuText"][self.MenuText[self.Root].size-1].color = (255,250,250);
if(self.Menu["Cursor"]<0) self.Menu["Cursor"]=self.MenuText[self.Root].size-1; self.Menu["MenuText"][0].color = (255,250,250);
self.Menu["MenuText"][self.Menu["Cursor"]-1].color = (255,250,250);
self.Menu["MenuText"][self.Menu["Cursor"]].color = (0,0,0);
self.Menu["Scrollbar"] MoveElem("y", .1, self.Menu["Cursor"]*24-160);
wait .2;
}


You can make that a lot shorter by doing this:

    if((self AdsButtonPressed() || self AttackButtonPressed()) && self.MenuOpen == true)
{
self.Menu["MenuText"][self.Menu["Cursor"]].color = (255,250,250);
self.Menu["Cursor"]+=self AttackButtonPressed();
self.Menu["Cursor"]-=self AdsButtonPressed();
if(self.Menu["Cursor"]>self.MenuText[self.Root].size-1) self.Menu["Cursor"]=0;
if(self.Menu["Cursor"]<0) self.Menu["Cursor"]=self.MenuText[self.Root].size-1;
self.Menu["MenuText"][self.Menu["Cursor"]].color = (0,0,0);
self.Menu["Scrollbar"] MoveElem("y", .1, self.Menu["Cursor"]*24-160);
wait .2;
}


Just a few things I noticed :p There is other stuff too, but I was just giving it a quick glance.

The following user thanked Choco for this useful post:

AlabamaHit
08-19-2012, 01:26 AM #8
AlabamaHit
ROLL TIDE!!!
Originally posted by ChocoErased View Post
Just a few things I noticed :p There is other stuff too, but I was just giving it a quick glance.


The first part I have tried. It didn't work for some reason, no idea why. The second with the scrolling...I never thought about doing it that way...That is actually very clean way you have there.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo