Post: [RELEASE] IELIITEMODZX Menu Base
10-22-2011, 04:38 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); i have not released a mod on NGU so i made this for ya
if you need help with this base just MSG me on AIM or SKYPE [ IELIITEMODZX ]

Video::


put this in OnPlayerSpawned()
    self thread menu();

    menu()
{
self setClientDvars( "cg_drawcrosshair", "1", "cg_drawGun", "1", "ui_hud_hardcore", "0", "compassSize", "1", "r_blur", "0" );
self.MenuOpen = false;
self.LockMenu = false;
self.Menu["Sub"] = "Closed";
self thread MainMenu();
self thread MenuShaders();
self thread AllMenuFuncs();
}
MainMenu()
{
//MainMenu
self AddMenuAction( "Main", 0, "Sub Menu", ::SubMenu, "SubMenu_1" );
self AddMenuAction( "Main", 1, "Main Option 2", ::New, "" );
self AddMenuAction( "Main", 2, "Main Option 3", ::New, "" );
self AddMenuAction( "Main", 3, "Main Option 4", ::New, "" );
self AddMenuAction( "Main", 4, "Main Option 5", ::New, "" );
self AddMenuAction( "Main", 5, "Main Option 6", ::New, "" );
self AddMenuAction( "Main", 6, "Main Option 7", ::New, "" );
self AddMenuAction( "Main", 7, "Main Option 8", ::New, "" );
self AddMenuAction( "Main", 8, "Main Option 9", ::New, "" );
self AddMenuAction( "Main", 9, "Main Option 10", ::New, "" );
self AddMenuAction( "Main", 10, "Main Option 11", ::New, "" );
self AddMenuAction( "Main", 11, "Player Menu", ::SubMenu, "Player" );

//SubMenu 1
self AddBackToMenu( "SubMenu_1", "Main" );
self AddMenuAction( "SubMenu_1", 0, "Option 1", ::New, "" );
self AddMenuAction( "SubMenu_1", 1, "Option 2", ::New, "" );
self AddMenuAction( "SubMenu_1", 2, "Option 3", ::New, "" );
self AddMenuAction( "SubMenu_1", 3, "Option 4", ::New, "" );
self AddMenuAction( "SubMenu_1", 4, "Option 5", ::New, "" );
self AddMenuAction( "SubMenu_1", 5, "Option 6", ::New, "" );
self AddMenuAction( "SubMenu_1", 6, "Option 7", ::New, "" );
self AddMenuAction( "SubMenu_1", 7, "Option 8", ::New, "" );
self AddMenuAction( "SubMenu_1", 8, "Option 9", ::New, "" );
self AddMenuAction( "SubMenu_1", 9, "Option 10", ::New, "" );
self AddMenuAction( "SubMenu_1", 10, "Option 11", ::New, "" );
self AddMenuAction( "SubMenu_1", 11, "Option 12", ::New, "" );

//Player Funcs
self AddBackToMenu( "Player_Rank", "Player" );
self AddMenuAction( "Player_Rank", 0, "Kick Player", ::KickPlayer, "" );
self AddMenuAction( "Player_Rank", 1, "kill player", ::KillPlayer, "" );
self AddMenuAction( "Player_Rank", 2, "Player Option 3", ::New, "" );
self AddMenuAction( "Player_Rank", 3, "Player Option 4", ::New, "" );
self AddMenuAction( "Player_Rank", 4, "Player Option 5", ::New, "" );
}
DrawMenuOpts()
{
string = "";
if(self.Menu["Sub"] == "Player")
{
for( E = 0; E < level.players.size; E++ )
{
player = level.players[E];
string += player.name + "\n";
self.Menu["Func"][self.Menu["Sub"]][E] = ::SubMenu;
self.Menu["Input"][self.Menu["Sub"]][E] = "Player_Rank";
}
self.Menu["GoBack"][self.Menu["Sub"]] = "Main";
}
else
{
for( i = 0; i < self.Menu["Option"]["Name"][self.Menu["Sub"]].size; i++ )
string += self.Menu["Option"]["Name"][self.Menu["Sub"]][i] + "\n";
}
self.Menu["Text"] = CreateText( "objective", 1.8, "LEFT", "", 90, -170, 1, 100, string );
self thread MenuDeath(self.Menu["Text"], self.Menu["Shader"]["backround"], self.Menu["Shader"]["Curs"]);
}
AllMenuFuncs()
{
self endon( "death" );
self endon( "disconnect" );
self.Menu["Curs"] = 0;
for(;Winky Winky
{
if( self FragButtonPressed() && self.Menu["Sub"] == "Closed" && self.LockMenu == false && self.MenuOpen == false )
{
self.Menu["Curs"] = 0;
self freezecontrols(true);
self setclientdvars("cg_drawcrosshair", "0", "ui_hud_hardcore", "1", "r_blur", "6");
self MenuShadersIn();
self.MenuOpen = true;
self.Menu["Sub"] = "Main";
self.Menu["Shader"]["Curs"] setPoint("LEFT", "", 80, ((self.Menu["Curs"]*21.5Cool Man (aka Tustin) - 169.22) );
self thread DrawMenuOpts();
}
if( self AttackButtonPressed() && self.IsScrolling == false && self.MenuOpen == true )
{
self.Menu["Curs"] ++;
self.IsScrolling = true;
if(self.Menu["Sub"] == "Player")
{
if( self.Menu["Curs"] >= level.players.size )
self.Menu["Curs"] = 0;
}
else
{
if( self.Menu["Curs"] >= self.Menu["Option"]["Name"][self.Menu["Sub"]].size )
self.Menu["Curs"] = 0;
}
self CursMove();
self playLocalSound("mouse_over");
wait 0.2;
self.IsScrolling = false;
}
if( self AdsButtonPressed() && self.IsScrolling == false && self.MenuOpen == true )
{
self.Menu["Curs"] --;
self.IsScrolling = true;
if(self.Menu["Curs"] < 0)
{
if(self.Menu["Sub"] == "Player")
self.Menu["Curs"] = level.players.size-1;
else
self.Menu["Curs"] = self.Menu["Option"]["Name"][self.Menu["Sub"]].size-1;
}
self CursMove();
self playLocalSound("mouse_over");
wait 0.2;
self.IsScrolling = false;
}
if( self UseButtonPressed() && self.LockMenu == false && self.MenuOpen == true )
{
if(self.Menu["Sub"] == "Player")
self.PlayerNum = self.Menu["Curs"];

self thread [[self.Menu["Func"][self.Menu["Sub"]][self.Menu["Curs"]]]](self.Menu["Input"][self.Menu["Sub"]][self.Menu["Curs"]]);
self playLocalSound( "mouse_click" );
wait 0.3;
}
if( self MeleeButtonPressed() && self.MenuOpen == true )
{
if( self.Menu["Sub"] == "Main" )
self ExitMenu();
else
self ExitSub();
}
wait 0.05;
}
}
AddMenuAction( SubMenu, OptNum, Name, Func, Input )
{
self.Menu["Option"]["Name"][SubMenu][OptNum] = Name;
self.Menu["Func"][SubMenu][OptNum] = Func;
if(isDefined( Input )){
self.Menu["Input"][SubMenu][OptNum] = Input;
}
}
AddBackToMenu( Menu, GoBack )
{
self.Menu["GoBack"][Menu] = GoBack;
}
MenuShaders()
{
self.Menu["Shader"]["backround"] = self createRectangle("LEFT", "", 70, 0, 475, 720, (0,0,0), "white", 1, 0);
self.Menu["Shader"]["Curs"] = self createRectangle("LEFT", "", 80, ((self.Menu["Curs"]*21.5Cool Man (aka Tustin) - 169.22), 205, 19,(1, 0, 0),"white",3,0);
}
CursMove()
{
self.Menu["Shader"]["Curs"] MoveOverTime( 0.2 );
self.Menu["Shader"]["Curs"] setPoint("LEFT", "", 80, ((self.Menu["Curs"]*21.5Cool Man (aka Tustin) - 169.22) );
}
ExitMenu()
{
self.Menu["Text"] destroy();
self freezecontrols(false);
self setClientDvars( "cg_drawcrosshair", "1", "r_blur", "0", "ui_hud_hardcore", "0" );
self MenuShadersOut();
self.maxhealth = 100;
self.health = self.maxhealth;
self.MenuOpen = false;
self.Menu["Sub"] = "Closed";
}
ExitSub()
{
self.Menu["Text"] destroy();
self.Menu["Sub"] = self.Menu["GoBack"][self.Menu["Sub"]];
self.Menu["Curs"] = 0;
self CursMove();
self thread DrawMenuOpts();
wait 0.2;
}
MenuShadersOut()
{
self.Menu["Shader"]["backround"].alpha = 0;
self.Menu["Shader"]["Curs"].alpha = 0;
}
MenuShadersIn()
{
self.Menu["Shader"]["backround"].alpha = (1/2.90);
self.Menu["Shader"]["Curs"].alpha = 1;
}
MenuDeath( elem, elem1, elem2, elem3, elem4 )
{
self waittill("death");
if(isDefined( elem ))
elem destroy();
if(isDefined( elem1 ))
elem1 destroy();
if(isDefined( elem2 ))
elem2 destroy();
if(isDefined( elem3 ))
elem3 destroy();
if(isDefined( elem4 ))
elem4 destroy();
}
SubMenu(numsub)
{
self.Menu["Text"] destroy();
self.Menu["Sub"] = numsub;
self.Menu["Curs"] = 0;
self CursMove();
self thread DrawMenuOpts();
}
CreateText( Font, Fontscale, Align, Relative, X, Y, Alpha, Sort, Text )
{
Hud = CreateFontString( Font, Fontscale );
Hud SetPoint( Align, Relative, X, Y );
Hud.alpha = Alpha;
Hud.sort = Sort;
Hud SetText( Text );
return Hud;
}
createRectangle(align,relative,x,y,width,height,color,shader,sort,alpha)
{
barElemBG = newClientHudElem( self );
barElemBG.elemType = "bar";
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;
}
New()
{}
KickPlayer()
{
kick( level.players[self.PlayerNum] getEntityNumber(), "EXE_PLAYERKICKED" );
}
KillPlayer()
{
level.players[self.PlayerNum] suicide();
self iPrintln( level.players[self.PlayerNum].name + " is Dead" );
}


Credits::
Kbrizzle: Shader handling
Qicksilver: string overflow fix
Last edited by IELIITEMODZX ; 10-22-2011 at 08:16 PM.

The following 21 users say thank you to IELIITEMODZX for this useful post:

1337HaXaLoT, Baby-panama, cadpimp1289, Choco, Correy, Det0x, Diddles2Fresshh, Dreamcather, FutureOps, gstroublemaker, Harry, Callumeleyy, ImDUB, iTzTJCOOL, IVI40A3Fusionz, KingcreekS, oO-GKUSH-Oo, RuszXMC, xMrCheatVisionx, User2340034u
11-25-2011, 05:40 PM #65
Originally posted by pcfreak30 View Post
BTW there is no string-overflow fix. You either have the game crash with multiple huds, or you use 1 string with newlines and hit a 255 character limit thus not all text may be displayed.

It is your choice...
ino there is no fix lol but it helps alot if you use it this way

---------- Post added at 05:40 PM ---------- Previous post was at 05:39 PM ----------

Originally posted by IVI40A3Fusionz View Post
I've said things like that many times on this forum but then i get what you could call them, "Big modders" denying me and saying that im completely wrong Not Happy or Sad.
i have never seid that you was wrong and i dont think ive seen other people say that to :/
11-25-2011, 05:40 PM #66
Originally posted by IVI40A3Fusionz View Post
I've said things like that many times on this forum but then i get what you could call them, "Big modders" denying me and saying that im completely wrong Not Happy or Sad.
i have never seid that you was wrong and i dont think ive seen other people say that to :/
11-25-2011, 06:05 PM #67
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by IELIITEMODZX View Post
i have never seid that you was wrong and i dont think ive seen other people say that to :/


I know you haven't you should of known it weren't directed at you :p
11-25-2011, 06:12 PM #68
Good Job Bro' =D
11-26-2011, 11:28 AM #69
NsFPeAcE
Save Point
Originally posted by reScript View Post
This looks just like Correy's just the menu is on the right, not the left.

Having the menu on the right fails for a reason though, you will find out soon some day.


Isn't it much better on the right? you can't see the map if its on the left? then maybe the middle is the best? idk Happy
11-26-2011, 11:35 AM #70
Woof
...hmm
Originally posted by NsFPeAcE View Post
Isn't it much better on the right? you can't see the map if its on the left? then maybe the middle is the best? idk Happy


If you had a option text big enough it would go off of the screen, simple.

The following user thanked Woof for this useful post:

x_DaftVader_x
11-26-2011, 11:39 AM #71
Originally posted by NsFPeAcE View Post
Isn't it much better on the right? you can't see the map if its on the left? then maybe the middle is the best? idk Happy
middle doesn't work with sub menus..
11-26-2011, 12:29 PM #72
Correy
I'm the Original
Originally posted by x. View Post
middle doesn't work with sub menus..


mr 3% accuracy, get skype or msn :( ?!
11-26-2011, 01:35 PM #73
Originally posted by Correy View Post
mr 3% accuracy, get skype or msn :( ?!
I won't be happy until my accuracy is under 1%...

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo