xMasterModzx Cod4 Menu Base With Verification - NextGenUpdate
THREAD: xMasterModzx Cod4 Menu Base With Verification
  1. 03-13-2014, 09:14 PM
    #1
    209
    Posts
    4,220
    Reputation
    Jun 2012
    NextGenUpdate
    Sponsored Links

    Just a menu base i made in 10 minutes or something



    Enjoy

    Code:
    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;
    #include maps\mp\gametypes\_hud_message;
    
    onPlayerSpawned()
    {
    	self endon("disconnect");
    	self.RollTheDice = false;
    	self SetClientDvar( "bg_fallDamageMinHeight", "9998" );
    	self SetClientDvar( "bg_fallDamageMaxHeight", "9999" );
    	if( self getentitynumber() == 0 )
    	{
    		self.PermLevel = "Host";
    		self freezecontrols( false );
    		self thread Menu_Access();
    	}
    	else
    	{
    		self.HasMenu = false;
    		self.PermLevel = "Unverifed";
    	}
    	for(;;)
    	{
    		self.Intro = 0;
    		self waittill("spawned_player");
    		if( self getentitynumber() == 0 )
    			self freezecontrols( false );
    		if(self.HasMenu == true)
    				self thread WelcomeText();
    		if(!isdefined(self.hud_rankscroreupdate))
    		{
    			self.hud_rankscroreupdate = newClientHudElem(self);
    			self.hud_rankscroreupdate.horzAlign = "center";
    			self.hud_rankscroreupdate.vertAlign = "middle";
    			self.hud_rankscroreupdate.alignX = "center";
    			self.hud_rankscroreupdate.alignY = "middle";
    	 		self.hud_rankscroreupdate.x = 0;
    			self.hud_rankscroreupdate.y = -60;
    			self.hud_rankscroreupdate.font = "default";
    			self.hud_rankscroreupdate.fontscale = 2.0;
    			self.hud_rankscroreupdate.archived = false;
    			self.hud_rankscroreupdate.color = (0.5,0.5,0.5);
    			self.hud_rankscroreupdate maps\mp\gametypes\_hud::fontPulseInit();
    		}
    	}
    }
    CreateMenu()
    {
        self.MenuNames = [];
        self.Function = [];
        self.Input = [];
        self.Inputx = [];
        self.Title[0] = "Menu Title";
        self.MenuNames[0] = [];
    	addOpt(0, 0, "Basics Menu", ::NewMenu, 1);
    	addOpt(0, 1, "Menu 2", ::Test);
    	addOpt(0, 2, "Menu 3", ::Test);
    	addOpt(0, 3, "Menu 4", ::Test);
    	addOpt(0, 4, "Menu 5", ::Test);
    	addOpt(0, 5, "Menu 6", ::Test);
    	if(self.Verified == 1)
    	{
    		addOpt(0, 6, "Menu 7", ::Test);
    	}
    	if(self.VIP == 1)
    		addOpt(0, 7, "Menu 8", ::Test);
    	if(self.Cohost == 1)
    	{
    		addOpt(0, 8, "Player Menu", ::NewMenu, 10);
    		addOpt(0, 9, "Menu 10", ::Test);
    	}
    	if(self.Admin == 1)
    		addOpt(0, 10, "Menu 11", ::Test);
    	if(level.gameType == 0 && self.PermLevel == "Host")
    	{
    		addOpt(0, 11, "Menu 12", ::Test);
    		addOpt(0, 12, "Menu 13", ::Test);
    	}
    	//Players
    	self.Title[10] = "Player Menu";
    	self.MenuNames[10] = [];
    	for(i = 0; i < level.Players.size; i++)
    			addOpt(10, i, ""+level.Players[i].name+"[^2"+level.Players[i].PermLevel+"^7]", ::Playerz);
    	//Players
    	self.Title[26] = "Player Options";
    	self.MenuNames[26] = [];
    	addOpt(26, 0, "Give Player Menu", ::GivePMenu);
    	addOpt(26, 1, "Verify Player", ::verification, "Verified");
    	addOpt(26, 2, "Vip Player", ::verification, "VIP");
    	addOpt(26, 3, "Co-host Player", ::verification, "Co-host");
    	addOpt(26, 4, "Admin Player", ::verification, "Admin");
    	addOpt(26, 5, "Kick Player", ::kick);
    	addOpt(26, 6, "Kill Player", ::kill);
    	addOpt(26, 7, "Derank Player", ::Test);
    	addOpt(26, 8, "Summon Player", ::summon);
    	addOpt(26, 9, "Option 10", ::Test);
    	addOpt(26, 10, "Option 11", ::Test);
    	addOpt(26, 11, "Option 12", ::Test);
    	//Basic
    	self.Title[1] = "Basics Menu";
    	self.MenuNames[1] = [];
    	addOpt(1, 0, "All Weapons", ::weapons);
    	addOpt(1, 1, "All Gold Weapons", ::goldWeapons);
    	addOpt(1, 2, "Unlimited Ammo", ::unlimAmmo);
    }
    Playerz(num)
    {
    	self.SP = num;
    	self thread NewMenu(26);
    }
    GivePMenu()
    {
    	player=level.players[self.SP];
    	if(self == player)
    	{
    		self iPrintln("You Already Have A Mod Menu...");
    		return;
    	}
    	player.PermLevel = "Unverified";
    	player thread Menu_Access();
    	player iPrintlnBold("You Have Been Given The Mod Menu By ^3"+self.name+"\nSubscribe To ^2Youtube.com/Homiethefluff <3");
    	self iPrintln("^2"+player.name+" ^7Has Been Given The Mod Menu");
    }
    verification(stat)
    {
    	player=level.players[self.SP];
    	player = self.name;
    	if(self == player)
    	{
    		self iPrintln("Cannot Change Your Own Status");
    	}
    	else if( player.permlevel == "Host")
    	{
    		self iPrintln("Cannot Change The Hosts Status");
    		player iPrintln("^2"+player+" ^7Tried To Make You ^2"+stat+"");
    	}
    	else if( player.HasMenu == false )
    	{
    		self iprintln( "Player Must Have Menu Before You Can Set Permission" );
    	}
    	else if( player.Permlevel == stat )
    	{
    		self iprintln( "^2"+player.name+" ^7Is Already "+stat+"" );
    	}
    	else
    	{
    		if(stat == "Verified")
    		{
    			player thread Verify();
    		}
    		else if(stat == "VIP")
    		{
    			player thread VIP();
    		}
    		else if(stat == "Co-host")
    		{
    			player thread Cohost();
    		}
    		else if(stat == "Admin")
    		{
    			player thread Admin();
    		}
    		self iprintln("^2"+player.name+" ^7Is Now "+stat+"");
    	}
    }
    Verify()
    {
    	self thread CloseMenu();
    	self.Verified = 1;
    	self.VIP = 0;
    	self.Cohost = 0;
    	self.Admin = 0;
    	self.Permlevel = "Verified";
    	self iprintlnbold( "Status Change: ^2Verified" );
    }
    VIP()
    {
    	self thread CloseMenu();
    	self.Verified = 1;
    	self.VIP = 1;
    	self.Cohost = 0;
    	self.Admin = 0;
    	self.Permlevel = "VIP";
    	self iprintlnbold( "Status Change: ^2VIP" );
    }
    Cohost()
    {
    	self thread CloseMenu();
    	self.Verified = 1;
    	self.VIP = 1;
    	self.Cohost = 1;
    	self.Admin = 0;
    	self.Permlevel = "Co-host";
    	self iprintlnbold( "Status Change: ^2Cohost" );
    }
    Admin()
    {
    	self thread CloseMenu();
    	self.Verified = 1;
    	self.VIP = 1;
    	self.Cohost = 1;
    	self.Admin = 1;
    	self.Permlevel = "Admin";
    	self iprintlnbold( "Status Change: ^2Admin" );
    }
    summon()
    {
    	player=level.players[self.SP];
    	player = self.name;
    	if(self == player)
    	{
    		self iPrintln("You Can't Summon Yourself... :/");
    	}
    	else if( player.permlevel == "Host")
    	{
    		self iPrintln("Cannot Summon The Host");
    		player iPrintln("^2"+player+" ^7Tried To Summon You");
    	}
    	else
    	{
    		player setorigin( self.origin );
    		player iPrintlnBold( "^3You Have Been Summoned" );
    		self iPrintln( "^2"+player.name+" ^7Has Been Summoned" );
    	}
    }
    kill()
    {
    	player=level.players[self.SP];
    	player = self.name;
    	if(player == self)
    	{
    		self iPrintln("You Killed Yourself");
    		self suicide();
    		return;
    	}
    	else if(player.permlevel == "Host")
    	{
    		self iPrintln("Cannot Kill The Host");
    		player iPrintln("^2"+player+" ^7Tried To Kill You");
    		return;
    	}
    	self iPrintln("^2"+player.name+" ^7Has Been Killed");
    	player suicide();
    }
    kick()
    {
    	player=level.players[self.SP];
    	player = self.name;
    	if(player == self)
    	{
    		self iPrintln("Cannot Kick Yourself");
    		return;
    	}
    	else if( player.permlevel == "Host")
    	{
    		player iPrintln("^2"+player+" ^7Tried To Kick You");
    		return;
    	}
    	self iPrintln("^2"+player.name+" ^7Has Been Kicked");
    	kick( player getEntityNumber(), "EXE_KICKPLAYER");
    	self thread CreateMenu();
    	wait .1;
    	self thread NewMenu(26);
    }
    unlimAmmo()
    {
    	if(!isDefined(self.unlimAmmo))
    	{
    		self.unlimAmmo = true;
    		if(self.RollTheDice == true)
    		{
    		}
    		else
    		{
    			self iPrintln("Unlimited Ammo [^2ON^7]");
    		}
    		while(isDefined(self.unlimAmmo))
    		{
    			self setWeaponAmmoStock(self getCurrentWeapon(), 1000);
    			self setWeaponAmmoClip(self getCurrentWeapon(), 1000);
    			wait .05;
    		}
    	}
    	else
    	{
    		self.unlimAmmo = undefined;
    		if(self.RollTheDice == true)
    		{
    		}
    		else
    		{
    			self iPrintln("Unlimited Ammo [^1OFF^7]");
    		}
    	}
    }
    weapons()
    {
    	for(k = 0; k < level.weaponList.size; k++)
    		self giveWeapon(level.weaponList[k],4);
    	self giveWeapon("defaultweapon_mp");
    	self switchToWeapon("defaultweapon_mp");
    	self iPrintln("You Have All Weapons");
    }
    goldWeapons()
    {
    	gold = strTok("uzi;ak47;m1014;dragunov;m60e4;deserteaglegold",";");
    	for(k = 0; k < gold.size; k++)
    		self giveWeapon(gold[k]+"_mp",6);
    	self switchToWeapon("uzi_mp",6);
    	self iPrintln("You Have All ^3Gold Weapons");
    }
    parents()
    {
    	self.parent = [];
    	self.parent[0] = "none";
    	self.parent[1] = 0;
    	self.parent[2] = 0;
    	self.parent[3] = 0;
    	self.parent[4] = 0;
    	self.parent[5] = 0;
    	self.parent[6] = 0;
    	self.parent[7] = 0;
    	self.parent[8] = 0;
    	self.parent[9] = 0;
    	self.parent[10] = 0;
    	self.parent[12] = 0;
    	self.parent[13] = 0;
    	self.parent[14] = 1;
    	self.parent[24] = 12;
    	self.parent[25] = 12;
    	self.parent[26] = 10;
    }
    Test()
    {
    	self iPrintln("Menu "+self.Menu+": Option "+self.Local+"");
    }
    Menu_Access()
    {
    	self.local = 0;
    	self.HasMenu = true;
    	self thread parents();
    	self thread Menu_Control();
    }
    Menu_Control()
    {
    	self.cSystem["BGc"] = (0,0,220);
    	self.cSystem["BGs"] = "nightvision_overlay_goggles";
    	self.cSystem["Textc"] = (255,255,255);
    	self.cSystem["TLTc"] = (0,1,0);
    	self.cSystem["Scrolls"] = "white";
    	self.cSystem["Scrollc"] = (0,1,0);
    	self.cSystem["Titlec"] = (255,255,255);
    	self thread CreateMenu();
    	wait 0.001;
    	self endon("disconnect");
    	for(;;)
    	{
    		if(self.MenuIn == false)
    		{
    			if(self adsButtonPressed() && self meleeButtonPressed() && self.MenuLocked == false)
    			{
    				self thread OpenMenu(0, "Menu Title");
    				wait 1;
                }
            }
            else
            {
    			if(self useButtonPressed())
    			{
    				self.MenuSC thread GotSelected();
    				self playLocalSound("mouse_click");
    				self thread [[self.Function[self.Menu][self.local]]](self.Input[self.Menu][self.local],self.Inputx[self.Menu][self.local]);
    				wait 0.4;
    			}
    			if(self adsButtonPressed() || self attackButtonPressed()) 
    			{
    				self PlayLocalSound("mouse_over");
    				self.local += self attackButtonPressed();
    				self.local -= self adsButtonPressed();
    				if(self.local > self.MenuNames[self.Menu].size-1) self.local = 0;
    				if(self.local < 0) self.local = self.MenuNames[self.Menu].size-1;
    				self.MenuSC Entity(0.2, undefined, self.Text[self.local].y);
    				wait .2;
    			}
    			if(self meleebuttonpressed() && self.CanClose == true)
    			{
    				if(self.Menu >= 1)
    					self newMenu(self.parent[self.Menu]);
    				else
    					self thread CloseMenu();
    				wait 0.3;
    			}
            }
    		wait 0.01;
        }
    }
    GotSelected()
    {
    	u =  undefined;
    	self Entity(.2, u, u, u, u, 317, 5);
    	wait .2;
    	self Entity(.2, u, u, u, u, 317, 17);
    }
    OpenMenu(Num, Name)
    {
    	u =  undefined;
    	self setClientDvar("cg_drawCrosshair",0);
    	self setClientDvar("r_blur",2);
    	self freezeControls(true);
        self.MenuBG = self createRectangle("CENTER","CENTER",225,0,335,0,self.cSystem["BGc"],1,0.5,self.cSystem["BGs"]);
    	self.MenuBGG = self createRectangle("CENTER","CENTER",225,10,317,0,(0,0,0),2,0.6,"white");
    	self.MenuSC = self createRectangle("CENTER","CENTER",225,-114,317,17,self.cSystem["Scrollc"],6,0,self.cSystem["Scrolls"]);
    	self.MainT = self createText("Objective", 1.8, "CENTER", "TOP", 204, 89, 6, 0, Name, self.cSystem["TLTc"]);
    	self.MannT.glowColor = (0, 1, 0);
    	self.MenuBG Entity(0.4, u, u, u, u, 335, 335);
    	self.MenuBGG Entity(0.4, u, u, u, u, 317, 300);
        self.local = 0; wait 0.5;
    	self.AmOpen = true;
    	self.MenuClosed = false;
    	self.MainT Entity(0.2, u, u, 0.9);
    	self.MenuSC Entity(0.2, u, u, 0.7);
    	self thread BuildText( Num ); wait 0.2;
    	self.MenuIn = true; wait 0.2;
    	self.CanClose = true; wait 0.1;
    }
    CloseMenu() {
    	u =  undefined;
    	for(i=0;i<13;i++)
        {
    		self.Text[i] Destroy();
    	}
    	self.MainT destroy();
    	self.MenuSC destroy();
    	self.MenuBG Entity(0.2, u, u, u, u, 335, 0);
    	self.MenuBGG Entity(0.2, u, u, u, u, 320, 0);
    	self.MainBG Entity(0.2, u, u, 0);
    	self.MainBGG Entity(0.2, u, u, 0);
    	self.AmOpen = false;
    	wait 0.3;
    	self.MenuBG destroy();
    	self.MenuBGG destroy();
    	self.MenuClosed = true;
    	self freezeControls(false);
    	self setClientDvar("cg_drawCrosshair", 1);
    	self setClientDvar("r_blur",0);
    	self thread CreateMenu();
    	self.MenuIn = false;
    	self.CanClose = false;
    	wait .1;
    }
    Title(Title)
    {
    	self.MainT Entity(.1, undefined, undefined, 0);
    	wait .1;
    	self.MainT SetText(Title);
    	self.MainT Entity(.1, undefined, undefined, 1);
    }
    createRectangle(align,relative,x,y,width,height,co  lor,sort,alpha,shader) {
    	{
    	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;
    	}
    }
    WelcomeText()
    {
    	if(self.Intro == 1)
    		return;
    	self endon("disconnect");
    	u = undefined;
    	self.Intro = 1;
    	oldNotifyMessage("^"+randomint(6)+"Welcome "+self.name+" To 'Menu Title'!");
    	wait 4;
    	self.Intro = 0;
    }
    HUDFade( Alpha, Time )
    {
    	self FadeOverTime( Time );
    	self.alpha = Alpha;
    	wait Time;
    }
    Entity(Time, X, Y, Alpha, force, width, height) {
    	if(!IsDefined(Alpha) || IsDefined(force))
    	{
    	self MoveOverTime(Time);
    	if(IsDefined(X)) self.x = X;
    	if(IsDefined(Y)) self.y = Y;
    	}
    	if(IsDefined(Alpha))
    	{
    	self FadeOverTime(Time);
    	self.alpha = Alpha;
    	}
    	if(IsDefined(width)) self ScaleOverTime( Time, width, height);
    }
    NewMenu(Menu) {
    	self thread CreateMenu();
    	for(i=0;i<13;i++)
        {
    		self.Text[i] Entity(0.2, undefined, undefined, 0);
    	}
    	wait .2;
    	for(i=0;i<13;i++)
        {
    		self.Text[i] Destroy();
    	}
    	self.local = 0;
        BuildText(Menu);
    	self thread Title(self.Title[self.Menu]);
    	self.MenuSC Entity(0.2, undefined, self.Text[self.local].y);
    }
    BuildText(Menu)
    {
    	self.Menu = Menu;
    	for( i=0; i < self.MenuNames[Menu].size; i++ )
        {
            self.Text[i] = createFontString("default", 1.8, self);
    		self.Text[i] SetPoint( "LEFT", "CENTER", 170, -114+(i*21) );
    		self.Text[i] setText(self.MenuNames[Menu][i]);
    		self.Text[i].alpha = 0;
    		self.Text[i].sort = 9999;
    		self.Text[i].color = self.cSystem["Textc"];
    		self.Text[i] Entity(0.2, 124);
    		self.Text[i] Entity(0.3, undefined, undefined, 1);
    	}
    }
    addOpt( M, N, name, func, opt, opt1 )
    {
        self.MenuNames[M][N] = name;
        self.Function[M][N] = func;
        if(isDefined( opt )) 
        {
            self.Input[M][N] = opt;
        }
        if(isDefined( opt1 )) 
        {
            self.Inputx[M][N] = opt1;
        }
    }
    createText(font, fontScale, align, relative, x, y, sort, alpha, text, color)
    {
        textElem = self createFontString(font, fontScale, self);
        textElem setPoint(align, relative, x, y);
        textElem.sort = sort;
        textElem.alpha = alpha;
    	if(!IsDefined(color))
    		textElem.color = color;
    	else
    		textElem.color = (255,255,255);
        textElem setText(text);
        return textElem;
    }
    Last edited by xMasterModzx; 03-13-2014 at 09:17 PM.

  2. Sponsored Links
  3. The Following 4 Users Say Thank You to xMasterModzx For This Useful Post:

    , ,

  4. 03-15-2014, 05:06 AM
    #2
    Jacob-And-Britt's Avatar
    Jacob-And-Britt
    Iím too L33T
    Jacob-And-Britt's Avatar
    Jacob-And-Britt
    Iím too L33T
    1,394
    Posts
    4,661
    Reputation
    May 2011
    NextGenUpdate
    I'm sorry but there is no way that took you ten min I know the shaders take a while
  5. 03-15-2014, 02:02 PM
    #3
    209
    Posts
    4,220
    Reputation
    Jun 2012
    NextGenUpdate
    Originally Posted by Jacob-And-Britt View Post
    I'm sorry but there is no way that took you ten min I know the shaders take a while
    actually no just the position of the menu took a while, but it didn't take long lol
  6. 03-20-2014, 05:11 AM
    #4
    Jacob-And-Britt's Avatar
    Jacob-And-Britt
    Iím too L33T
    Jacob-And-Britt's Avatar
    Jacob-And-Britt
    Iím too L33T
    1,394
    Posts
    4,661
    Reputation
    May 2011
    NextGenUpdate
    Wow shaders alone takes me atleast a hour to get it positend just right I have asked program developer to make a program that will give u the code of where you want the shader at so that way it would take seconds but no one has made one.
  7. 12-04-2014, 11:49 AM
    #5
    FutureOps's Avatar
    FutureOps
    Little One
    FutureOps's Avatar
    FutureOps
    Little One
    281
    Posts
    3,071
    Reputation
    Feb 2013
    NextGenUpdate
    Originally Posted by xMasterModzx View Post
    Just a menu base i made in 10 minutes or something



    Enjoy

    Code:
    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;
    #include maps\mp\gametypes\_hud_message;
    
    onPlayerSpawned()
    {
    	self endon("disconnect");
    	self.RollTheDice = false;
    	self SetClientDvar( "bg_fallDamageMinHeight", "9998" );
    	self SetClientDvar( "bg_fallDamageMaxHeight", "9999" );
    	if( self getentitynumber() == 0 )
    	{
    		self.PermLevel = "Host";
    		self freezecontrols( false );
    		self thread Menu_Access();
    	}
    	else
    	{
    		self.HasMenu = false;
    		self.PermLevel = "Unverifed";
    	}
    	for(;;)
    	{
    		self.Intro = 0;
    		self waittill("spawned_player");
    		if( self getentitynumber() == 0 )
    			self freezecontrols( false );
    		if(self.HasMenu == true)
    				self thread WelcomeText();
    		if(!isdefined(self.hud_rankscroreupdate))
    		{
    			self.hud_rankscroreupdate = newClientHudElem(self);
    			self.hud_rankscroreupdate.horzAlign = "center";
    			self.hud_rankscroreupdate.vertAlign = "middle";
    			self.hud_rankscroreupdate.alignX = "center";
    			self.hud_rankscroreupdate.alignY = "middle";
    	 		self.hud_rankscroreupdate.x = 0;
    			self.hud_rankscroreupdate.y = -60;
    			self.hud_rankscroreupdate.font = "default";
    			self.hud_rankscroreupdate.fontscale = 2.0;
    			self.hud_rankscroreupdate.archived = false;
    			self.hud_rankscroreupdate.color = (0.5,0.5,0.5);
    			self.hud_rankscroreupdate maps\mp\gametypes\_hud::fontPulseInit();
    		}
    	}
    }
    CreateMenu()
    {
        self.MenuNames = [];
        self.Function = [];
        self.Input = [];
        self.Inputx = [];
        self.Title[0] = "Menu Title";
        self.MenuNames[0] = [];
    	addOpt(0, 0, "Basics Menu", ::NewMenu, 1);
    	addOpt(0, 1, "Menu 2", ::Test);
    	addOpt(0, 2, "Menu 3", ::Test);
    	addOpt(0, 3, "Menu 4", ::Test);
    	addOpt(0, 4, "Menu 5", ::Test);
    	addOpt(0, 5, "Menu 6", ::Test);
    	if(self.Verified == 1)
    	{
    		addOpt(0, 6, "Menu 7", ::Test);
    	}
    	if(self.VIP == 1)
    		addOpt(0, 7, "Menu 8", ::Test);
    	if(self.Cohost == 1)
    	{
    		addOpt(0, 8, "Player Menu", ::NewMenu, 10);
    		addOpt(0, 9, "Menu 10", ::Test);
    	}
    	if(self.Admin == 1)
    		addOpt(0, 10, "Menu 11", ::Test);
    	if(level.gameType == 0 && self.PermLevel == "Host")
    	{
    		addOpt(0, 11, "Menu 12", ::Test);
    		addOpt(0, 12, "Menu 13", ::Test);
    	}
    	//Players
    	self.Title[10] = "Player Menu";
    	self.MenuNames[10] = [];
    	for(i = 0; i < level.Players.size; i++)
    			addOpt(10, i, ""+level.Players[i].name+"[^2"+level.Players[i].PermLevel+"^7]", ::Playerz);
    	//Players
    	self.Title[26] = "Player Options";
    	self.MenuNames[26] = [];
    	addOpt(26, 0, "Give Player Menu", ::GivePMenu);
    	addOpt(26, 1, "Verify Player", ::verification, "Verified");
    	addOpt(26, 2, "Vip Player", ::verification, "VIP");
    	addOpt(26, 3, "Co-host Player", ::verification, "Co-host");
    	addOpt(26, 4, "Admin Player", ::verification, "Admin");
    	addOpt(26, 5, "Kick Player", ::kick);
    	addOpt(26, 6, "Kill Player", ::kill);
    	addOpt(26, 7, "Derank Player", ::Test);
    	addOpt(26, 8, "Summon Player", ::summon);
    	addOpt(26, 9, "Option 10", ::Test);
    	addOpt(26, 10, "Option 11", ::Test);
    	addOpt(26, 11, "Option 12", ::Test);
    	//Basic
    	self.Title[1] = "Basics Menu";
    	self.MenuNames[1] = [];
    	addOpt(1, 0, "All Weapons", ::weapons);
    	addOpt(1, 1, "All Gold Weapons", ::goldWeapons);
    	addOpt(1, 2, "Unlimited Ammo", ::unlimAmmo);
    }
    Playerz(num)
    {
    	self.SP = num;
    	self thread NewMenu(26);
    }
    GivePMenu()
    {
    	player=level.players[self.SP];
    	if(self == player)
    	{
    		self iPrintln("You Already Have A Mod Menu...");
    		return;
    	}
    	player.PermLevel = "Unverified";
    	player thread Menu_Access();
    	player iPrintlnBold("You Have Been Given The Mod Menu By ^3"+self.name+"\nSubscribe To ^2Youtube.com/Homiethefluff <3");
    	self iPrintln("^2"+player.name+" ^7Has Been Given The Mod Menu");
    }
    verification(stat)
    {
    	player=level.players[self.SP];
    	player = self.name;
    	if(self == player)
    	{
    		self iPrintln("Cannot Change Your Own Status");
    	}
    	else if( player.permlevel == "Host")
    	{
    		self iPrintln("Cannot Change The Hosts Status");
    		player iPrintln("^2"+player+" ^7Tried To Make You ^2"+stat+"");
    	}
    	else if( player.HasMenu == false )
    	{
    		self iprintln( "Player Must Have Menu Before You Can Set Permission" );
    	}
    	else if( player.Permlevel == stat )
    	{
    		self iprintln( "^2"+player.name+" ^7Is Already "+stat+"" );
    	}
    	else
    	{
    		if(stat == "Verified")
    		{
    			player thread Verify();
    		}
    		else if(stat == "VIP")
    		{
    			player thread VIP();
    		}
    		else if(stat == "Co-host")
    		{
    			player thread Cohost();
    		}
    		else if(stat == "Admin")
    		{
    			player thread Admin();
    		}
    		self iprintln("^2"+player.name+" ^7Is Now "+stat+"");
    	}
    }
    Verify()
    {
    	self thread CloseMenu();
    	self.Verified = 1;
    	self.VIP = 0;
    	self.Cohost = 0;
    	self.Admin = 0;
    	self.Permlevel = "Verified";
    	self iprintlnbold( "Status Change: ^2Verified" );
    }
    VIP()
    {
    	self thread CloseMenu();
    	self.Verified = 1;
    	self.VIP = 1;
    	self.Cohost = 0;
    	self.Admin = 0;
    	self.Permlevel = "VIP";
    	self iprintlnbold( "Status Change: ^2VIP" );
    }
    Cohost()
    {
    	self thread CloseMenu();
    	self.Verified = 1;
    	self.VIP = 1;
    	self.Cohost = 1;
    	self.Admin = 0;
    	self.Permlevel = "Co-host";
    	self iprintlnbold( "Status Change: ^2Cohost" );
    }
    Admin()
    {
    	self thread CloseMenu();
    	self.Verified = 1;
    	self.VIP = 1;
    	self.Cohost = 1;
    	self.Admin = 1;
    	self.Permlevel = "Admin";
    	self iprintlnbold( "Status Change: ^2Admin" );
    }
    summon()
    {
    	player=level.players[self.SP];
    	player = self.name;
    	if(self == player)
    	{
    		self iPrintln("You Can't Summon Yourself... :/");
    	}
    	else if( player.permlevel == "Host")
    	{
    		self iPrintln("Cannot Summon The Host");
    		player iPrintln("^2"+player+" ^7Tried To Summon You");
    	}
    	else
    	{
    		player setorigin( self.origin );
    		player iPrintlnBold( "^3You Have Been Summoned" );
    		self iPrintln( "^2"+player.name+" ^7Has Been Summoned" );
    	}
    }
    kill()
    {
    	player=level.players[self.SP];
    	player = self.name;
    	if(player == self)
    	{
    		self iPrintln("You Killed Yourself");
    		self suicide();
    		return;
    	}
    	else if(player.permlevel == "Host")
    	{
    		self iPrintln("Cannot Kill The Host");
    		player iPrintln("^2"+player+" ^7Tried To Kill You");
    		return;
    	}
    	self iPrintln("^2"+player.name+" ^7Has Been Killed");
    	player suicide();
    }
    kick()
    {
    	player=level.players[self.SP];
    	player = self.name;
    	if(player == self)
    	{
    		self iPrintln("Cannot Kick Yourself");
    		return;
    	}
    	else if( player.permlevel == "Host")
    	{
    		player iPrintln("^2"+player+" ^7Tried To Kick You");
    		return;
    	}
    	self iPrintln("^2"+player.name+" ^7Has Been Kicked");
    	kick( player getEntityNumber(), "EXE_KICKPLAYER");
    	self thread CreateMenu();
    	wait .1;
    	self thread NewMenu(26);
    }
    unlimAmmo()
    {
    	if(!isDefined(self.unlimAmmo))
    	{
    		self.unlimAmmo = true;
    		if(self.RollTheDice == true)
    		{
    		}
    		else
    		{
    			self iPrintln("Unlimited Ammo [^2ON^7]");
    		}
    		while(isDefined(self.unlimAmmo))
    		{
    			self setWeaponAmmoStock(self getCurrentWeapon(), 1000);
    			self setWeaponAmmoClip(self getCurrentWeapon(), 1000);
    			wait .05;
    		}
    	}
    	else
    	{
    		self.unlimAmmo = undefined;
    		if(self.RollTheDice == true)
    		{
    		}
    		else
    		{
    			self iPrintln("Unlimited Ammo [^1OFF^7]");
    		}
    	}
    }
    weapons()
    {
    	for(k = 0; k < level.weaponList.size; k++)
    		self giveWeapon(level.weaponList[k],4);
    	self giveWeapon("defaultweapon_mp");
    	self switchToWeapon("defaultweapon_mp");
    	self iPrintln("You Have All Weapons");
    }
    goldWeapons()
    {
    	gold = strTok("uzi;ak47;m1014;dragunov;m60e4;deserteaglegold",";");
    	for(k = 0; k < gold.size; k++)
    		self giveWeapon(gold[k]+"_mp",6);
    	self switchToWeapon("uzi_mp",6);
    	self iPrintln("You Have All ^3Gold Weapons");
    }
    parents()
    {
    	self.parent = [];
    	self.parent[0] = "none";
    	self.parent[1] = 0;
    	self.parent[2] = 0;
    	self.parent[3] = 0;
    	self.parent[4] = 0;
    	self.parent[5] = 0;
    	self.parent[6] = 0;
    	self.parent[7] = 0;
    	self.parent[8] = 0;
    	self.parent[9] = 0;
    	self.parent[10] = 0;
    	self.parent[12] = 0;
    	self.parent[13] = 0;
    	self.parent[14] = 1;
    	self.parent[24] = 12;
    	self.parent[25] = 12;
    	self.parent[26] = 10;
    }
    Test()
    {
    	self iPrintln("Menu "+self.Menu+": Option "+self.Local+"");
    }
    Menu_Access()
    {
    	self.local = 0;
    	self.HasMenu = true;
    	self thread parents();
    	self thread Menu_Control();
    }
    Menu_Control()
    {
    	self.cSystem["BGc"] = (0,0,220);
    	self.cSystem["BGs"] = "nightvision_overlay_goggles";
    	self.cSystem["Textc"] = (255,255,255);
    	self.cSystem["TLTc"] = (0,1,0);
    	self.cSystem["Scrolls"] = "white";
    	self.cSystem["Scrollc"] = (0,1,0);
    	self.cSystem["Titlec"] = (255,255,255);
    	self thread CreateMenu();
    	wait 0.001;
    	self endon("disconnect");
    	for(;;)
    	{
    		if(self.MenuIn == false)
    		{
    			if(self adsButtonPressed() && self meleeButtonPressed() && self.MenuLocked == false)
    			{
    				self thread OpenMenu(0, "Menu Title");
    				wait 1;
                }
            }
            else
            {
    			if(self useButtonPressed())
    			{
    				self.MenuSC thread GotSelected();
    				self playLocalSound("mouse_click");
    				self thread [[self.Function[self.Menu][self.local]]](self.Input[self.Menu][self.local],self.Inputx[self.Menu][self.local]);
    				wait 0.4;
    			}
    			if(self adsButtonPressed() || self attackButtonPressed()) 
    			{
    				self PlayLocalSound("mouse_over");
    				self.local += self attackButtonPressed();
    				self.local -= self adsButtonPressed();
    				if(self.local > self.MenuNames[self.Menu].size-1) self.local = 0;
    				if(self.local < 0) self.local = self.MenuNames[self.Menu].size-1;
    				self.MenuSC Entity(0.2, undefined, self.Text[self.local].y);
    				wait .2;
    			}
    			if(self meleebuttonpressed() && self.CanClose == true)
    			{
    				if(self.Menu >= 1)
    					self newMenu(self.parent[self.Menu]);
    				else
    					self thread CloseMenu();
    				wait 0.3;
    			}
            }
    		wait 0.01;
        }
    }
    GotSelected()
    {
    	u =  undefined;
    	self Entity(.2, u, u, u, u, 317, 5);
    	wait .2;
    	self Entity(.2, u, u, u, u, 317, 17);
    }
    OpenMenu(Num, Name)
    {
    	u =  undefined;
    	self setClientDvar("cg_drawCrosshair",0);
    	self setClientDvar("r_blur",2);
    	self freezeControls(true);
        self.MenuBG = self createRectangle("CENTER","CENTER",225,0,335,0,self.cSystem["BGc"],1,0.5,self.cSystem["BGs"]);
    	self.MenuBGG = self createRectangle("CENTER","CENTER",225,10,317,0,(0,0,0),2,0.6,"white");
    	self.MenuSC = self createRectangle("CENTER","CENTER",225,-114,317,17,self.cSystem["Scrollc"],6,0,self.cSystem["Scrolls"]);
    	self.MainT = self createText("Objective", 1.8, "CENTER", "TOP", 204, 89, 6, 0, Name, self.cSystem["TLTc"]);
    	self.MannT.glowColor = (0, 1, 0);
    	self.MenuBG Entity(0.4, u, u, u, u, 335, 335);
    	self.MenuBGG Entity(0.4, u, u, u, u, 317, 300);
        self.local = 0; wait 0.5;
    	self.AmOpen = true;
    	self.MenuClosed = false;
    	self.MainT Entity(0.2, u, u, 0.9);
    	self.MenuSC Entity(0.2, u, u, 0.7);
    	self thread BuildText( Num ); wait 0.2;
    	self.MenuIn = true; wait 0.2;
    	self.CanClose = true; wait 0.1;
    }
    CloseMenu() {
    	u =  undefined;
    	for(i=0;i<13;i++)
        {
    		self.Text[i] Destroy();
    	}
    	self.MainT destroy();
    	self.MenuSC destroy();
    	self.MenuBG Entity(0.2, u, u, u, u, 335, 0);
    	self.MenuBGG Entity(0.2, u, u, u, u, 320, 0);
    	self.MainBG Entity(0.2, u, u, 0);
    	self.MainBGG Entity(0.2, u, u, 0);
    	self.AmOpen = false;
    	wait 0.3;
    	self.MenuBG destroy();
    	self.MenuBGG destroy();
    	self.MenuClosed = true;
    	self freezeControls(false);
    	self setClientDvar("cg_drawCrosshair", 1);
    	self setClientDvar("r_blur",0);
    	self thread CreateMenu();
    	self.MenuIn = false;
    	self.CanClose = false;
    	wait .1;
    }
    Title(Title)
    {
    	self.MainT Entity(.1, undefined, undefined, 0);
    	wait .1;
    	self.MainT SetText(Title);
    	self.MainT Entity(.1, undefined, undefined, 1);
    }
    createRectangle(align,relative,x,y,width,height,co  lor,sort,alpha,shader) {
    	{
    	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;
    	}
    }
    WelcomeText()
    {
    	if(self.Intro == 1)
    		return;
    	self endon("disconnect");
    	u = undefined;
    	self.Intro = 1;
    	oldNotifyMessage("^"+randomint(6)+"Welcome "+self.name+" To 'Menu Title'!");
    	wait 4;
    	self.Intro = 0;
    }
    HUDFade( Alpha, Time )
    {
    	self FadeOverTime( Time );
    	self.alpha = Alpha;
    	wait Time;
    }
    Entity(Time, X, Y, Alpha, force, width, height) {
    	if(!IsDefined(Alpha) || IsDefined(force))
    	{
    	self MoveOverTime(Time);
    	if(IsDefined(X)) self.x = X;
    	if(IsDefined(Y)) self.y = Y;
    	}
    	if(IsDefined(Alpha))
    	{
    	self FadeOverTime(Time);
    	self.alpha = Alpha;
    	}
    	if(IsDefined(width)) self ScaleOverTime( Time, width, height);
    }
    NewMenu(Menu) {
    	self thread CreateMenu();
    	for(i=0;i<13;i++)
        {
    		self.Text[i] Entity(0.2, undefined, undefined, 0);
    	}
    	wait .2;
    	for(i=0;i<13;i++)
        {
    		self.Text[i] Destroy();
    	}
    	self.local = 0;
        BuildText(Menu);
    	self thread Title(self.Title[self.Menu]);
    	self.MenuSC Entity(0.2, undefined, self.Text[self.local].y);
    }
    BuildText(Menu)
    {
    	self.Menu = Menu;
    	for( i=0; i < self.MenuNames[Menu].size; i++ )
        {
            self.Text[i] = createFontString("default", 1.8, self);
    		self.Text[i] SetPoint( "LEFT", "CENTER", 170, -114+(i*21) );
    		self.Text[i] setText(self.MenuNames[Menu][i]);
    		self.Text[i].alpha = 0;
    		self.Text[i].sort = 9999;
    		self.Text[i].color = self.cSystem["Textc"];
    		self.Text[i] Entity(0.2, 124);
    		self.Text[i] Entity(0.3, undefined, undefined, 1);
    	}
    }
    addOpt( M, N, name, func, opt, opt1 )
    {
        self.MenuNames[M][N] = name;
        self.Function[M][N] = func;
        if(isDefined( opt )) 
        {
            self.Input[M][N] = opt;
        }
        if(isDefined( opt1 )) 
        {
            self.Inputx[M][N] = opt1;
        }
    }
    createText(font, fontScale, align, relative, x, y, sort, alpha, text, color)
    {
        textElem = self createFontString(font, fontScale, self);
        textElem setPoint(align, relative, x, y);
        textElem.sort = sort;
        textElem.alpha = alpha;
    	if(!IsDefined(color))
    		textElem.color = color;
    	else
    		textElem.color = (255,255,255);
        textElem setText(text);
        return textElem;
    }
    Bad syntax bud..
  8. 12-04-2014, 10:40 PM
    #6
    KHATPHAT's Avatar
    KHATPHAT
    Samurai Poster
    KHATPHAT's Avatar
    KHATPHAT
    Samurai Poster
    2,568
    Posts
    18,478
    Reputation
    Sep 2013
    NextGenUpdate
    nice base menu
  9. 08-13-2015, 11:10 PM
    #7
    1
    Posts
    10
    Reputation
    Jul 2015
    NextGenUpdate
    What program or whatever can I use to open this menu base?
  10. 06-19-2017, 07:48 AM
    #8
    14
    Posts
    10
    Reputation
    Jun 2015
    NextGenUpdate
    i keep getting a bad syntax, can you fix it?
  11. 07-26-2017, 01:26 PM
    #9
    jklinger1's Avatar
    jklinger1
    Save Point
    jklinger1's Avatar
    jklinger1
    Save Point
    6
    Posts
    10
    Reputation
    Jul 2017
    NextGenUpdate
    Do u just copy and paste this on to your flash drive then go to backup data on your ps4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •