What's new

Mod Menu [Release(-Algorithm-)]Mod Menu Base

  • Thread starter AoKMiKeY
  • Start date
  • Views 2,261
AoKMiKeY

-Algorithm-

I am not a man.
Seasoned Veteran Experienced Veteran Grizzled Veteran
Messages
1,844
Reaction score
685
Points
315
Sin$
7
well since it was my birthday 4 days ago i thought f*** it i might as well release one of my many mod menu bases.

also this menu base was made over 6 weeks ago so yer its old

i has got affects like smooth menu scrolling amazing open and sub menu select.
i will get a video up for this as soon as i can because it is a truly a good menu base.
Heres a iwd for the people that can not get it working
http://www.mediafire.com/?35v2gh44wqlbqme






Update and error log (i made this at the same time as making the base so its a but full)
Code:
/*
A big thanks to modsrepository for some of the command
Thanks to K Brizal for the createRectangle Thread
Menu base scripting started:: 15:00 1/7/2011

Updates started on:: 15:42 1/7/2011:
Menu Bugs Fixed
Menu Controls Upgrade (more Advanced)
Taken out 3 useless thread (added to control)
Added AddMenu Thread (liked the idea from a mw2 Menu)
NewMenu Upgraded
Changed Design
Tried Making a Title text
Tried adding TEXT thread to contols (did not work out)
Made AddMenu thread More Advanced
Made A smother scroller (got bored here and stoped)
Fixed select Bug (found final)
Added a cool return for controls (very good idea)
Looked at comman.ff found a mod menu (help next update)
Took Out Addoption (thank u comman.ff)
menu base made small
controls rescripted
text added new argments
add menu made more advanced
new argments for TEXT, NewMenu, CONTROLS, Addmenu
menu hud change
tryed to add new menu to conrols (did not work out)
affects made smaller
text alpha fixed
text settext fixed(did not update propaly)[fixed]
added cool if statment to controls
added dpad for host
changed affects (new but fix)
menu u are on, does now run on text not numbers
added new affects (cool scroller added)
fix scroller frezing(control problem
made cool main menu(it is cool)
delete Text fixed
Main Menu fail fixed
new alpha fixed
delete text no longer a thread
cool affects is no longer a thread
cool alpha affect changed
added new affect to new menu
Update End on 11:21 6/7/2011
*/

Adding a Menu
Code:
///////////////////////////////////////////////////////////////////////////////////
//AddMenu(Root, Child, Name, Func, Input, Input1, Input2)
//			   *Root = Menu Root
//			   *Child = Menu number
//			   *Name = Text Displayed
//			   *Func = Menu Thread
//			   *input = Tread argument 1
//			   *input1 = Tread argument 2
//			   *input2 = Tread argument 3
////////////////////////////////////////////////////////////////////////////////////
to Run The Menu
(F*ck sorry all put this in cheat or what ever)
Code:
self.ControlsThreaded = false; // do not ever defined this as false again
self thread CONTROLS();

Controls
Key
Code:
HST/ = for host
Code:
To Open :: Melee or HST/ :: Dpad Right  
To Scroll up :: Ads Button or HST/ :: Dpad up
To Scroll Down :: Attack button or HST/ :: Dpad Down
To GoBack a menu :: melee or HST/ :: Dpad left
To Close :: frag or HST/ :: button B
to Select :: X button or HST/ :: button A

The Menu Base
Code:
TEXT(Root, alpha, x, y)
{
for(Child = 0;Child<self.menuName[Root].size;Child++)
{
self.MainText[Child] = self createfontstring("default", 1.5, self);
self.MainText[Child] setpoint("LEFT","CENTER", x, y + Child*24);
self.MainText[Child] settext(self.menuName[Root][Child]);
self.MainText[Child].alpha = alpha;
}
}
MainMenu()
{
AddMenu("Main", 0, "Main Menu 1", ::New, "Fun", "", "");
AddMenu("Main", 1, "Main Menu 2", ::New, "RanDom", "", "");
AddMenu("Main", 2, "Custom Hud", ::New, "Custom", "", "");
AddMenu("Main", 3, "Main Menu 4", "", "", "", "");
AddMenu("Fun", 0, "Fun Menu 1", ::New, "Main", "", "");
AddMenu("Fun", 1, "ran Menu 2", ::New, "RanDom", "", "");
AddMenu("Fun", 2, "Fun Menu 3", "", "", "", "");
AddMenu("RanDom", 0, "Random 1", ::New, "Main", "", "");
AddMenu("RanDom", 1, "Random 2", "", "", "", "");
AddMenu("RanDom", 2, "Random 3", "", "", "", "");
AddMenu("RanDom", 3, "Random 4", "", "", "", "");
AddMenu("RanDom", 4, "Random 5", "", "", "", "");
AddMenu("RanDom", 5, "Random 6", "", "", "", "");
AddMenu("RanDom", 6, "Random 7", "", "", "", "");
AddMenu("Custom", 0, "Menu BG Color", ::New, "", "", "");
AddMenu("Custom", 1, "Menu scroller Color", ::New, "", "", "");
AddMenu("Custom", 2, "Menu Text Color", ::New, "", "", "");
}
New(newMenu)
{
self.menulocal = 0;
self.NewMenu = newMenu;
for(i=0;i<=self.MainText.size-1;i++)
{
self.MainText[i] FadeOverTime(1);
self.MainText[i].alpha = 0;
}
self.Scroller FadeOverTime(1);
self.Scroller.alpha = 0;
self.BackGround FadeOverTime(1);
self.BackGround.alpha = 0;
wait 1;
for(i=0;i<=self.MainText.size-1;i++)
{
self.MainText[i] destroy();
}
if(self.NewMenu == "Main"){
self.BackGround.x = 0;
self.BackGround setShader("white", 350, 350);
self.Scroller.x = 0;
self.Scroller.y = -120;
self thread TEXT(self.NewMenu, 0, -120, -120);}
if(self.NewMenu != "Main"){
self.BackGround.x = -300;
self.BackGround setShader("white", 350, 1000);
self.Scroller.x = -300;
self.Scroller.y = -160;
self thread TEXT(self.NewMenu, 0, -400, -160);}
self.Scroller FadeOverTime(1);
self.Scroller.alpha = 1;
self.BackGround FadeOverTime(1);
self.BackGround.alpha = 1;
for(i=0;i<=self.MainText.size-1;i++)
{
self.MainText[i] FadeOverTime(1);
self.MainText[i].alpha = 1;
}
wait 0.5;
self thread CONTROLS(self.NewMenu);
self.Scroller MoveOverTime(0.5);
self.Scroller.y = self.MainText[self.menulocal].y;
}
CONTROLS(MenuThread)
{
if(self.ControlsThreaded == true)
{
self.menulocal = 0;
self.Menu = MenuThread;
return;
}
if(self.ControlsThreaded != true){
self.Menu = "Main";
self.MenuOpenState = false;
self.MenuState = false;
self.menulocal = 0;
self endon("disconnect");
for(;;)
{
if(self.MenuOpenState != true && self meleeButtonPressed()
|| self.MenuOpenState != true && self buttonPressed( "dpad_right" ))
{
self.BackGround = self createRectangle("CENTER","CENTER",0,-1000,350,350,(0,0,0),1,1,"white");
self.Scroller = self createRectangle("CENTER","CENTER",0,-700,350,25,(1,0,0),2,1,"white");
self setstance("stand");
self.menulocal = 0;
self thread MainMenu();
self thread TEXT("Main", 0, -120, -120);
self freezeControls(true);
self EnableHealthShield( true );
self EnableInvulnerability();
self.BackGround MoveOverTime(1);	self.BackGround.y = 0;
self.Scroller MoveOverTime(1);	 self.Scroller.y = -120;wait 0.7;
for(i=0;i<=self.MainText.size-1;i++){
self.MainText[i] FadeOverTime(1);
self.MainText[i].alpha = 1;}
self.MenuOpenState = true;
self.MenuState = true;
self.ControlsThreaded = true;
}
if(self AdsButtonPressed() && self.MenuState == true ||
self buttonPressed( "dpad_up" ) && self.MenuState == true)
{
//self iprintln("up");
self.menulocal--;
if(self.menulocal < 0)
self.menulocal = self.menuName[self.Menu].size-1;
if(self.menulocal > self.menuName[self.Menu].size-1)
self.menulocal = 0;
self.Scroller MoveOverTime(0.3);
self.Scroller.y = self.MainText[self.menulocal].y;
wait 0.2;
}
if( self attackButtonPressed() && self.MenuState == true ||
self buttonPressed( "dpad_Down" ) && self.MenuState == true)
{
//self iprintln("down");
self.menulocal++;
if(self.menulocal < 0)
self.menulocal = self.menuName[self.Menu].size-1;
if(self.menulocal > self.menuName[self.Menu].size-1)
self.menulocal = 0;
self.Scroller MoveOverTime(0.3);
self.Scroller.y = self.MainText[self.menulocal].y;
wait 0.2;
}
if(self useButtonPressed() && self.MenuState == true
|| self buttonPressed( "button_a" ) && self.MenuState == true)
{
self thread [[self.menuFunc[self.Menu][self.menulocal]]](self.menuinp[self.Menu][self.menulocal],self.menuinpu[self.Menu][self.menulocal],self.menuinput[self.Menu][self.menulocal]);
wait 0.5;
}
if(self MeleeButtonPressed() && self.MenuOpenState == true && self.MenuState == true
|| self buttonPressed( "dpad_left" ) && self.MenuOpenState == true && self.MenuState == true)
{
if(self.NewMenu != "Main"){
self.menulocal = 0;
self.NewMenu = "Main";
for(i=0;i<=self.MainText.size-1;i++){
self.MainText[i] fadeOverTime(1);
self.MainText[i].alpha = 0;}
self.Scroller FadeOverTime(1);
self.Scroller.alpha = 0;
self.BackGround FadeOverTime(1);
self.BackGround.alpha = 0;wait 1;
for(i=0;i<=self.MainText.size-1;i++){
self.MainText[i] destroy();}		  
self.BackGround.x = 0;
self.BackGround setShader("white", 350, 350);
self.Scroller.x = 0;
self.Scroller.y = -120;
self thread TEXT(self.NewMenu, 0, -120, -120);
for(i=0;i<=self.MainText.size-1;i++){
self.MainText[i] fadeOverTime(1);
self.MainText[i].alpha = 1;}
self.Scroller FadeOverTime(1);
self.Scroller.alpha = 1;
self.BackGround FadeOverTime(1);
self.BackGround.alpha = 1;wait 0.7;
self thread CONTROLS(self.NewMenu);
self.Scroller MoveOverTime(0.5);	
self.Scroller.y = self.MainText[self.menulocal].y;}
}
if(self fragButtonPressed() && self.MenuState == true
|| self buttonPressed( "button_b" ) && self.MenuState == true)
{
self.menulocal = 0;
for(i=0;i<=self.MainText.size-1;i++){
self.MainText[i] MoveOverTime(1);
self.MainText[i].x = -1000;wait 0.001;}
self.BackGround MoveOverTime(1);	self.BackGround.y = -1000;
self.Scroller MoveOverTime(1);	 self.Scroller.y = -700;  wait 1;
for(i=0;i<=self.MainText.size-1;i++){
self.MainText[i] destroy();}
self freezeControls(false);
self EnableHealthShield( false );
self DisableInvulnerability();
self.MenuOpenState = false;
self.MenuState = false;
self.BackGround destroy();
self.Scroller destroy();
}
wait 0.01;
}
}}
AddMenu(Root, Child, Name, Func, Input, Input1, Input2)
{
self.menuName[Root][Child] = Name;
self.menuFunc[Root][Child] = Func;
self.menuinp[Root][Child] = Input;
self.menuinpu[Root][Child] = Input1;
self.menuinput[Root][Child] =  Input2;
}
createRectangle(align,relative,x,y,width,height,color,sort,alpha,shader)
{
barElemBG = newClientHudElem( self );
barElemBG.elemType = "bar";
if ( !level.splitScreen )
{
barElemBG.x = -2;
barElemBG.y = -2;
}
barElemBG.width = width;
barElemBG.height = height;
barElemBG.align = align;
barElemBG.relative = relative;
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 setPoint(align,relative,x,y);
return barElemBG;
}

help full things to know so you dont reply them ::


Not trollin', don't like the way it moves when you enter a submenu, just my opinion :wink:
yer the vid is using the base but not what the base does in the scripting i have provided
 
Mikeeeyy

Mikeeeyy

Member
Modder Programmer Grammar Nazi
Messages
2,176
Reaction score
1,307
Points
485
Sin$
7
Not trollin', don't like the way it moves when you enter a submenu, just my opinion :wink:
 
AoKMiKeY

-Algorithm-

I am not a man.
Seasoned Veteran Experienced Veteran Grizzled Veteran
Messages
1,844
Reaction score
685
Points
315
Sin$
7
Not trollin', don't like the way it moves when you enter a submenu, just my opinion :wink:
yer the vid is using the base but not what the base does in the scripting i have provided
Edit: also mikeeey go on aim tomorrow i need to talk but im of to bed now
 
iHaXx

-SeaN-

Newbie
Messages
14
Reaction score
0
Points
35
Sin$
0
i cant seem to get this menu to work :/ me and a few friends have tried but no luck if someone could please upload a working patch ( within the maps folder) i would really apreciate it... thanks
 
E

ExE ScooBy Doo

Enthusiast
Messages
342
Reaction score
14
Points
70
Sin$
0
i cant seem to get this menu to work :/ me and a few friends have tried but no luck if someone could please upload a working patch ( within the maps folder) i would really apreciate it... thanks
Me too :/
 
H

HDKenny

Enthusiast
Messages
226
Reaction score
53
Points
85
Sin$
0
i cant seem to get this menu to work :/ me and a few friends have tried but no luck if someone could please upload a working patch ( within the maps folder) i would really apreciate it... thanks
same, to hard to read too so i dont wanna work too hard...
 
AoKMiKeY

-Algorithm-

I am not a man.
Seasoned Veteran Experienced Veteran Grizzled Veteran
Messages
1,844
Reaction score
685
Points
315
Sin$
7
sorry all this will make it work just put this in your cheat or what ever
Code:
self.ControlsThreaded = false; // do not ever defined this as false again
self thread CONTROLS();

get_players()[0] thread CONTROLS();
if you do that that its just going to make it not work for everyone also above is how to make it work
 
H

HDKenny

Enthusiast
Messages
226
Reaction score
53
Points
85
Sin$
0
sorry all this will make it work just put this in your cheat or what ever
Code:
self.ControlsThreaded = false; // do not ever defined this as false again
self thread CONTROLS();


if you do that that its just going to make it not work for everyone also above is how to make it work
oh thats why... thx
 
E

ExE ScooBy Doo

Enthusiast
Messages
342
Reaction score
14
Points
70
Sin$
0
Can u just make an folder with this menu threaded plz and working becuase I can't get it to work
 
Top Bottom
Login
Register