Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release BO Ultimate Admin System V1
#1
What is it?
BO Ultimate Admin System V1 is a admin system which is converted from an admin system in MW2 called MW2 Ultimate Admin System V3 and it can be used for any mod designed with easy of use, and to allow as much function, with as little code as possible. It is also open-source, allowing free editing.

What is inside the menu?
Due to some reason of converting, some function in the menu is deleted
- In-Game Gametype Changer
- In-Game Map Changer
- Map Rotation Toggle
- Hardcore Mode Toggle
- Restart Map Function
- End Game Function
- Beautiful Kick Menu
- Slay Menu
- Blind Menu
- Freeze Menu

How to add it to a mod?
1. Open your _rank.gsc
2. Locate your onPlayerSpawned() thread
3. Add the following line of code ABOVE for(;; )
Code:
if( self isHost() || self.GUID == ""){ self thread menuInit(); }

4. Add the following lines of code UNDER self waittill("spawned_player"); which is INSIDE for(;; )
Code:
self thread monitorA1();
self thread monitorA2();
self thread monitorA3();
self thread monitorA4();
self thread monitorA5();
self thread monitorA6();
self thread monitorA7();
self thread menu();

Menu Controls:
- [V] - Open/Close Menu
- [F] - Scroll Up
- [G] - Scroll Down
- [4+F] - Scroll Left
- [4+G] - Scroll Right
- [Space] - Select Option

Credits from BO:
- Me (Alistair3149) - Convert functions
- AZUMIKKEL - Fix monitoring buttons
- Eekhoorn - Idea suggesting (or I never start to do this)

Credits from MW2:
- ZerO (iZ3RO) - Menu Creation
- Zalew - Calling ZerO a selfish bastard on his birthday
- PhantomGamers - Beta Testing/Syntax Checking
- [CoD6HMod]Nukem - Beta Testing/Syntax Checking

Download:
Code:
menuInit()
{
        self endon( "disconnect" );
        
    iniMenuVarsSelf();
        iniMenuVars();
    level.hardcoreStatus = "^1Off";
    level.mapRotation = "^1Off";
    self thread menuHowTo2();

    for ( i = 0; i < level.players.size; i++ )
    {
        level.players[i].isFrozen = 0;
        level.players[i].isBlind = 0;
    }
}

menu()
{
        self endon ( "disconnect" );
        self endon ( "death" );
  
        for(;;)
    {
        self waittill( "open_menu" );
        {
                        if(self.menuIsOpen == false)
            {
                self.isFrozen = 1;
                self.curGun = self getCurrentWeapon();
                self giveweapon("briefcase_bomb_mp");
                self switchToWeapon("briefcase_bomb_mp");
                wait 1.6;

                                self.menuIsOpen = true;
                                self freeze_player_controls(true);
            }
            self thread menubg();
            self thread updateKick();
            self thread updateSlay();
            self thread updateFreeze();
            self thread updateBlind();
            self thread updateTele();
            self thread updateTeleTo();                            
                        self thread topLevelMenu();
                        self thread subMenu();
            self thread listenCycleRight();
            self thread listenCycleLeft();
                        self thread listenScrollUp();
                        self thread listenScrollDown();
                        self thread listenSelect();
                        self thread listenExit();
            self hide();
            self thread menuHowTo();
        }
    }
}

menubg()
{
        self endon ( "disconnect" );
        self endon ( "death" );

    self.bg = newclienthudelem( self );
    self.bg.x = 0;
    self.bg.y = 0;
    self.bg.horzAlign = "fullscreen";
    self.bg.vertAlign = "fullscreen";
    self.bg.sort = -1;
    self.bg.color = (1,1,1);
    self.bg SetShader( "black", 640, 480 );
    self.bg.alpha = 0.8;
    self thread destroyOnDeath( self.bg );
    self thread destroyOnExit( self.bg );
}

iniMenuVarsSelf()
{
    self.cycle = 0;
    self.scroll = 0;
    self.menuIsOpen = false;
    self.topLevelMenuOptions = 2;

        level.adminOptions = 7;
        self.topLevelMenuOptions += level.adminOptions;
        self.index = self.topLevelMenuOptions - level.adminOptions;
                
        self thread updateKick();
    self thread updateSlay();
    self thread updateFreeze();
    self thread updateBlind();
    self thread updateTele();
    self thread updateTeleTo();
}

//Default Menu Setting
iniMenuVars()
{
        level.menuX = 100;
        level.menuY = 13.5;
        level.subMenuNumOptions = [];
        
        //Sub Menu 1 -- Maps
        level.topLevelMenuNames[0] = "<Maps>";
        level.subMenuNumOptions[0] = 14;
        level.subMenuNames[0] = [];
        level.subMenuNames[0][0] = "Array";
        level.subMenuNames[0][1] = "Havana";
        level.subMenuNames[0][2] = "Launch";
        level.subMenuNames[0][3] = "Cracked";
        level.subMenuNames[0][4] = "Crisis";
        level.subMenuNames[0][5] = "Grid";
        level.subMenuNames[0][6] = "Firing Range";
        level.subMenuNames[0][7] = "Hanoi";
        level.subMenuNames[0][8] = "Jungle";
        level.subMenuNames[0][9] = "Summit";
        level.subMenuNames[0][10] = "NukeTown";
        level.subMenuNames[0][11] = "Radiation";
        level.subMenuNames[0][12] = "WMD";
        level.subMenuNames[0][13] = "Villa";
        
        level.subMenuFunctions[0] = [];
        level.subMenuFunctions[0][0] = :: doMap;
        level.subMenuFunctions[0][1] = :: doMap;
        level.subMenuFunctions[0][2] = :: doMap;
        level.subMenuFunctions[0][3] = :: doMap;
        level.subMenuFunctions[0][4] = :: doMap;
        level.subMenuFunctions[0][5] = :: doMap;
        level.subMenuFunctions[0][6] = :: doMap;
        level.subMenuFunctions[0][7] = :: doMap;
        level.subMenuFunctions[0][8] = :: doMap;
        level.subMenuFunctions[0][9] = :: doMap;
        level.subMenuFunctions[0][10] = :: doMap;
        level.subMenuFunctions[0][11] = :: doMap;
        level.subMenuFunctions[0][12] = :: doMap;
        level.subMenuFunctions[0][13] = :: doMap;
        
        level.subMenuInputs[0] = [];
        level.subMenuInputs[0][0] = 0;
        level.subMenuInputs[0][1] = 1;
        level.subMenuInputs[0][2] = 2;
        level.subMenuInputs[0][3] = 3;
        level.subMenuInputs[0][4] = 4;
        level.subMenuInputs[0][5] = 5;
        level.subMenuInputs[0][6] = 6;
        level.subMenuInputs[0][7] = 7;
        level.subMenuInputs[0][8] = 8;
        level.subMenuInputs[0][9] = 9;
        level.subMenuInputs[0][10] = 10;
        level.subMenuInputs[0][11] = 11;
        level.subMenuInputs[0][12] = 12;
        level.subMenuInputs[0][13] = 13;

        //Sub Menu 2 -- Gametypes
        level.topLevelMenuNames[1] = "<Games>";
        level.subMenuNumOptions[1] = 13;
        level.subMenuNames[1] = [];
        level.subMenuNames[1][0] = "Free-For-All";
        level.subMenuNames[1][1] = "Team Deathmatch";
        level.subMenuNames[1][2] = "Search & Destroy";
        level.subMenuNames[1][3] = "Sabotage";
        level.subMenuNames[1][4] = "Domination";
        level.subMenuNames[1][5] = "Headquarters";
        level.subMenuNames[1][6] = "Capture the Flag";
        level.subMenuNames[1][7] = "Demolition";
        level.subMenuNames[1][8] = "Gun Game";
        level.subMenuNames[1][9] = "Sharpshooter";
        level.subMenuNames[1][10] = "One in the chamber";
    level.subMenuNames[1][11] = "Sticks and stones";
        
        level.subMenuFunctions[1] = [];
        level.subMenuFunctions[1][0] = :: doGT;
        level.subMenuFunctions[1][1] = :: doGT;
        level.subMenuFunctions[1][2] = :: doGT;
        level.subMenuFunctions[1][3] = :: doGT;
        level.subMenuFunctions[1][4] = :: doGT;
        level.subMenuFunctions[1][5] = :: doGT;
        level.subMenuFunctions[1][6] = :: doGT;
        level.subMenuFunctions[1][7] = :: doGT;
        level.subMenuFunctions[1][8] = :: doGT;
        level.subMenuFunctions[1][9] = :: doGT;
        level.subMenuFunctions[1][10] = :: doGT;
    level.subMenuFunctions[1][11] = :: doGT;
        
        level.subMenuInputs[1] = [];
        level.subMenuInputs[1][0] = 0;
        level.subMenuInputs[1][1] = 1;
        level.subMenuInputs[1][2] = 2;
        level.subMenuInputs[1][3] = 3;
        level.subMenuInputs[1][4] = 4;
        level.subMenuInputs[1][5] = 5;
        level.subMenuInputs[1][6] = 6;
        level.subMenuInputs[1][7] = 7;
        level.subMenuInputs[1][8] = 8;
        level.subMenuInputs[1][9] = 9;
        level.subMenuInputs[1][10] = 10;
    level.subMenuInputs[1][11] = 11;


    //Admin Menu
        level.topLevelMenuNames[self.index] = "<Options>";
        level.subMenuNumOptions[self.index] = 4;
        level.subMenuNames[self.index] = [];
        level.subMenuNames[self.index][0] = "Hardcore: On/Off";
    level.subMenuNames[self.index][1] = "Map Rotation: On/Off";
        level.subMenuNames[self.index][2] = "Restart Map";
        level.subMenuNames[self.index][3] = "End Game";
        
        level.subMenuFunctions[self.index] = [];
        level.subMenuFunctions[self.index][0] = :: hardcore;
        level.subMenuFunctions[self.index][1] = :: mapRotation;
        level.subMenuFunctions[self.index][2] = :: mapRestart;
        level.subMenuFunctions[self.index][3] = :: gameEnd;
    

        level.subMenuInputs[self.index] = [];
        level.subMenuInputs[self.index][0] = "";
        level.subMenuInputs[self.index][1] = "";
        level.subMenuInputs[self.index][2] = "";
        level.subMenuInputs[self.index][3] = "";


}

//Monitor Buttons
monitorA1()
{
    self endon("death");
    self endon("disconnect");

    for(;;)
    {
        while(!self ActionSlotOneButtonPressed())
        wait 0.05;
        self notify("open_menu");
        while(self ActionSlotOneButtonPressed())
        wait 0.05;
    }
}

monitorA2()
{
    self endon("death");
    self endon("disconnect");

    for(;;)
    {
        while(!self MeleeButtonPressed())
        wait 0.05;
        self notify("close_menu");
        while(self MeleeButtonPressed())
        wait 0.05;
    }
}

monitorA3()
{
    self endon("death");
    self endon("disconnect");

    for(;;)
    {
        while(!self SecondaryOffHandButtonPressed() || !self UseButtonPressed())
        wait 0.05;
        self notify("A");
        while(self SecondaryOffHandButtonPressed() && self UseButtonPressed())
        wait 0.05;
    }
}

monitorA4()
{
    self endon("death");
    self endon("disconnect");

    for(;;)
    {
        while(!self SecondaryOffHandButtonPressed() || !self FragButtonPressed())
        wait 0.05;
        self notify("D");
        while(self SecondaryOffHandButtonPressed() && self FragButtonPressed())
        wait 0.05;
    }
}

monitorA5()
{
    self endon("death");
    self endon("disconnect");

    for(;;)
    {
        while(!self FragButtonPressed())
        wait 0.05;
        self notify("S");
        while(self FragButtonPressed())
        wait 0.05;
    }
}

monitorA6()
{
    self endon("death");
    self endon("disconnect");

    for(;;)
    {
        while(!self UseButtonPressed())
        wait 0.05;
        self notify("W");
        while(self UseButtonPressed())
        wait 0.05;
    }
}

monitorA7()
{
    self endon("death");
    self endon("disconnect");

    for(;;)
    {
        while(!self JumpButtonPressed())
        wait 0.05;
        self notify("Space");
        while(self JumpButtonPressed())
        wait 0.05;
    }
}


//Sub functions
updateKick()
{
        level.topLevelMenuNames[self.index+1] = "<Kick>";
        level.subMenuNumOptions[self.index+1] = level.players.size;
        
        level.subMenuNames[self.index+1] = [];
        level.subMenuFunctions[self.index+1] = [];
        level.subMenuInputs[self.index+1] = [];
        
        for(i = 0; i < level.players.size; i++){
                level.subMenuNames[self.index+1][i] = level.players[i].name;
                level.subMenuFunctions[self.index+1][i] = :: kickPlayer;
                //level.subMenuInputs[self.index+1][i] = level.players[i] getEntityNumber();
        level.subMenuInputs[self.index+1][i] = level.players[i];
                }
}

updateSlay()
{
        level.topLevelMenuNames[self.index+2] = "<Slay>";
        level.subMenuNumOptions[self.index+2] = level.players.size;
        
        level.subMenuNames[self.index+2] = [];
        level.subMenuFunctions[self.index+2] = [];
        level.subMenuInputs[self.index+2] = [];
        
        for(i = 0; i < level.players.size; i++)
    {
                level.subMenuNames[self.index+2][i] = level.players[i].name;
                level.subMenuFunctions[self.index+2][i] = :: slayPlayer;
                level.subMenuInputs[self.index+2][i] = level.players[i];
    }
}

updateFreeze()
{
        level.topLevelMenuNames[self.index+3] = "<Freeze>";
        level.subMenuNumOptions[self.index+3] = level.players.size;
        
        level.subMenuNames[self.index+3] = [];
        level.subMenuFunctions[self.index+3] = [];
        level.subMenuInputs[self.index+3] = [];
        
        for(i = 0; i < level.players.size; i++)
    {
                level.subMenuNames[self.index+3][i] = level.players[i].name;
                level.subMenuFunctions[self.index+3][i] = :: freezePlayer;
                level.subMenuInputs[self.index+3][i] = level.players[i];
    }
}

updateBlind()
{
        level.topLevelMenuNames[self.index+4] = "<Blind>";
        level.subMenuNumOptions[self.index+4] = level.players.size;
        
        level.subMenuNames[self.index+4] = [];
        level.subMenuFunctions[self.index+4] = [];
        level.subMenuInputs[self.index+4] = [];
        
        for(i = 0; i < level.players.size; i++)
    {
                level.subMenuNames[self.index+4][i] = level.players[i].name;
                level.subMenuFunctions[self.index+4][i] = :: blindPlayer;
                level.subMenuInputs[self.index+4][i] = level.players[i];
    }
}

updateTele()
{
        level.topLevelMenuNames[self.index+5] = "<Tele>";
        level.subMenuNumOptions[self.index+5] = level.players.size;
        
        level.subMenuNames[self.index+5] = [];
        level.subMenuFunctions[self.index+5] = [];
        level.subMenuInputs[self.index+5] = [];
        
        for(i = 0; i < level.players.size; i++)
    {
                level.subMenuNames[self.index+5][i] = level.players[i].name;
                level.subMenuFunctions[self.index+5][i] = :: telePlayer;
                level.subMenuInputs[self.index+5][i] = level.players[i];
    }
}

updateTeleTo()
{
        level.topLevelMenuNames[self.index+6] = "<Tele To>";
        level.subMenuNumOptions[self.index+6] = level.players.size;
        
        level.subMenuNames[self.index+6] = [];
        level.subMenuFunctions[self.index+6] = [];
        level.subMenuInputs[self.index+6] = [];
        
        for(i = 0; i < level.players.size; i++)
    {
                level.subMenuNames[self.index+6][i] = level.players[i].name;
                level.subMenuFunctions[self.index+6][i] = :: teleToPlayer;
                level.subMenuInputs[self.index+6][i] = level.players[i];
    }
}

kickPlayer( indexOfPlayer )
{
        self endon ( "disconnect" );

    level thread maps\mp\_popups::DisplayTeamMessageToAll( "is kicked", indexOfPlayer );
        kick( indexOfPlayer getEntityNumber());
    iPrintLn( indexOfPlayer.name + " was kicked by: ^3" + self.name);

    self.bg destroy();
    self.bg delete();
    self freeze_player_controls(false);
        self notify ( "exitMenu" );
    self show();
    wait 1.5;
    iPrintLn("^5|BO Admin Menu|");
}

slayPlayer( indexOfPlayer )
{
        self endon ( "disconnect" );
    indexOfPlayer suicide();
    level thread maps\mp\_popups::DisplayTeamMessageToAll( "is slayed", indexOfPlayer );
    iPrintLn(indexOfPlayer.name + " was slayed by: ^3" + self.name);

    self.bg destroy();
    self.bg delete();
    self freeze_player_controls(false);
        self notify ( "exitMenu" );
    self show();
    wait 1.5;
    iPrintLn("^5|BO Admin Menu|");
}

freezePlayer( indexOfPlayer )
{
        self endon ( "disconnect" );
    if(indexOfPlayer.isFrozen == 0)
    {
        indexOfPlayer freeze_player_controls(true);
        indexOfPlayer.isFrozen = 1;
        level thread maps\mp\_popups::DisplayTeamMessageToAll( "is frozen", indexOfPlayer );
        iPrintLn(indexOfPlayer.name + " was frozen by: ^3" + self.name);
    }

    else if(indexOfPlayer.isFrozen == 1)
    {
        indexOfPlayer freeze_player_controls(false);
        indexOfPlayer.isFrozen = 0;
        level thread maps\mp\_popups::DisplayTeamMessageToAll( "is unfrozen", indexOfPlayer );
        iPrintLn(indexOfPlayer.name + " was unfrozen by: ^3" + self.name);
    }

    self.bg destroy();
    self.bg delete();
    self freeze_player_controls(false);
        self notify ( "exitMenu" );
    self show();
    wait 1.5;
    iPrintLn("^5|BO Admin Menu|");
}

blindPlayer( indexOfPlayer )
{
        self endon ( "disconnect" );
    if(indexOfPlayer.isBlind == 0)
    {
        indexOfPlayer.blackscreen = newclienthudelem( self );
        indexOfPlayer.blackscreen.x = 0;
        indexOfPlayer.blackscreen.y = 0;
        indexOfPlayer.blackscreen.horzAlign = "fullscreen";
        indexOfPlayer.blackscreen.vertAlign = "fullscreen";
        indexOfPlayer.blackscreen.sort = 50;
        indexOfPlayer.blackscreen SetShader( "black", 640, 480 );
        indexOfPlayer.blackscreen.alpha = 1;
        indexOfPlayer.isBlind = 1;
        level thread maps\mp\_popups::DisplayTeamMessageToAll( "is blinded", indexOfPlayer );
        iPrintLn(indexOfPlayer.name + " was blinded by: ^3" + self.name);
    }

    else if(indexOfPlayer.isBlind == 1)
    {
        indexOfPlayer.blackscreen destroy();
        indexOfPlayer.blackscreen delete();
        indexOfPlayer.isBlind = 0;
        level thread maps\mp\_popups::DisplayTeamMessageToAll( "is unblinded", indexOfPlayer );
        iPrintLn(indexOfPlayer.name + " was unblinded by: ^3" + self.name);
    }

    self.bg destroy();
    self.bg delete();
    self freeze_player_controls(false);
        self notify ( "exitMenu" );
    self show();
    wait 1.5;
    iPrintLn("^5|BO Admin Menu|");
}

telePlayer( indexOfPlayer )
{
        self endon ( "disconnect" );

    adminOrigin = self.origin;
    indexOfPlayer setOrigin(adminOrigin);

    iPrintLn(indexOfPlayer.name + " was teleported to: ^3" + self.name);

    self.bg destroy();
    self.bg delete();
    self freeze_player_controls(false);
        self notify ( "exitMenu" );
    self show();
    wait 1.5;
    iPrintLn("^5|BO Admin Menu|");
}

teleToPlayer( indexOfPlayer )
{
        self endon ( "disconnect" );
    iPrintLn("^3" + self.name + " ^7has teleported to: " + indexOfPlayer.name);

    self setOrigin(indexOfPlayer.origin);

    self.bg destroy();
    self.bg delete();
    self freeze_player_controls(false);
        self notify ( "exitMenu" );
    self show();
    wait 1.5;
    iPrintLn("^5|BO Admin Menu|");
}

listenCycleRight()
{
        self endon ( "disconnect" );
        self endon ( "death" );
        self endon ( "exitMenu" );
        
        for(;;)
    {
                self waittill("D");
        {
                        self notify ( "cycleRight" );
                        self.cycle++;
                        self.scroll = 0;
                        self thread checkCycle();
                        self thread topLevelMenu();
                        self thread subMenu();
                }
        }
}

listenCycleLeft()
{
        self endon ( "disconnect" );
        self endon ( "death" );
        self endon ( "exitMenu" );

        for(;;)
    {
                self waittill( "A" );
        {
                        self notify ( "cycleLeft" );
                        self.cycle--;
                        self.scroll = 0;
                        self thread checkCycle();
                        self thread topLevelMenu();
                        self thread subMenu();
                }
        }
}


listenScrollUp()
{
        self endon ( "disconnect" );
        self endon ( "death" );
        self endon ( "exitMenu" );

        for(;;)
    {
                self waittill( "W" );
        {
                        self notify ( "scrollUp" );
                        self.scroll--;
                        self thread checkScroll();
                        self thread subMenu();
                }
        }
}

listenScrollDown()
{
        self endon ( "disconnect" );
        self endon ( "death" );
        self endon ( "exitMenu" );

        for(;;)
    {
                self waittill( "S" );
        {
                        self notify ( "scrollDown" );
                        self.scroll++;
                        self thread checkScroll();
                        self thread subMenu();
                }
        }
}

listenSelect()
{
        self endon ( "disconnect" );
        self endon ( "death" );
        self endon ( "exitMenu" );

        for(;;)
    {
                self waittill("Space");
        {
                        self thread [[level.subMenuFunctions[self.cycle][self.scroll]]](level.subMenuInputs[self.cycle][self.scroll]);
                }
        }
}

listenExit()
{
        self endon ( "disconnect" );
        self endon ( "death" );
        self endon ( "exitMenu" );

        for(;;)
    {
                self waittill("close_menu");
        {
            self.isFrozen = 0;
                        self.bg destroy();
            self.bg delete();
                        self freeze_player_controls(false);
                        self notify ( "exitMenu" );
                }
        }      
}

listenPlayersConnect()
{
        self endon ( "disconnect" );
        self endon ( "death" );
        self endon ( "exitMenu" );
        
        for(;;)
    {
                level waittill( "connected" );
        {
            self.bg destroy();
            self.bg delete();
                        self freeze_player_controls(false);
                        self notify ( "exitMenu" );
                }
        }
}

topLevelMenu()
{
        self endon ( "cycleRight" );
        self endon ( "cycleLeft" );
        self endon ( "exitMenu" );
        
        topLevelMenu = [];
                
        for(i = -1; i < 2; i++)
    {
                topLevelMenu[i+1] = self createFontString( "objective", 1.4 );
        topLevelMenu[i+1].sort = 1;
                //topLevelMenu[i+1] setPoint( "CENTER", "CENTER", (i)*level.menuX, (-1)*level.menuY );
        topLevelMenu[i+1] setPoint( "TOP", "TOP", (i)*level.menuX, 35+(-1)*level.menuY );
                if((i + self.cycle) < 0)
        {
                        topLevelMenu[i+1] setText(level.topLevelMenuNames[i + self.cycle + self.topLevelMenuOptions]);
                }
                else if((i + self.cycle) > self.topLevelMenuOptions - 1)
        {
                        topLevelMenu[i+1] setText(level.topLevelMenuNames[i + self.cycle - self.topLevelMenuOptions]);
                }
                else
        {
                        topLevelMenu[i+1] setText(level.topLevelMenuNames[i + self.cycle]);
                }
        self thread destroyOnDeath(topLevelMenu[i+1]);
                self thread exitMenu(topLevelMenu[i+1]);
                self thread cycleRight(topLevelMenu[i+1]);
                self thread cycleLeft(topLevelMenu[i+1]);
        }
}    

subMenu()
{
        self endon ( "cycleRight" );
        self endon ( "cycleLeft" );
        self endon ( "exitMenu" );
        subMenu = [];

        for(i = 0; i < level.subMenuNumOptions[self.cycle]; i++)
    {
                subMenu[i] = self createFontString( "objective", 1.0 );
        subMenu[i].sort = 1;
                //subMenu[i] setPoint( "CENTER", "CENTER", 0, i*level.menuY );
        subMenu[i] setPoint( "TOP", "TOP", 0, 44+i*level.menuY );
                if(i != self.scroll)
        {
                        subMenu[i] setText(level.subMenuNames[self.cycle][i]);
                }
                else
        {
                        subMenu[i] setText("^2? " + level.subMenuNames[self.cycle][i] + "^2 ?");
            //subMenu[i].fontScale = 1.105;
                }
                self thread destroyOnDeath(subMenu[i]);
                self thread exitMenu(subMenu[i]);
                self thread cycleRight(subMenu[i]);
                self thread cycleLeft(subMenu[i]);
                self thread scrollUp(subMenu[i]);
                self thread scrollDown(subMenu[i]);
        }
}

destroyOnDeath( hudElem )
{
        self waittill ( "death" );
        hudElem destroy();
    hudElem delete();
        self.menuIsOpen = false;
}

exitMenu( menu )
{
        self waittill ( "exitMenu" );
    self.bg destroy();
    self.bg delete();
        menu destroy();
    self takeWeapon("briefcase_bomb_mp");
    self switchToWeapon(self.curGun);
    self show();
        self.menuIsOpen = false;
}

cycleRight( menu )
{
        self waittill ( "cycleRight" );
        menu destroy();
}

cycleLeft( menu )
{
        self waittill ( "cycleLeft" );
        menu destroy();
}

scrollUp( menu )
{
        self waittill ( "scrollUp" );
        menu destroy();
}

scrollDown( menu )
{
        self waittill ( "scrollDown" );
        menu destroy();
}

checkCycle()
{
        if(self.cycle > self.topLevelMenuOptions - 1)
    {
                self.cycle = self.cycle - self.topLevelMenuOptions;
        }
        else if(self.cycle < 0)
    {
                self.cycle = self.cycle + self.topLevelMenuOptions;
        }
}

checkScroll()
{
        if(self.scroll < 0)
    {
                self.scroll = 0;
        }
        else if(self.scroll > level.subMenuNumOptions[self.cycle] - 1)
    {
                self.scroll = level.subMenuNumOptions[self.cycle] - 1;
        }
}

//Map data
doMap( namemap )
{
        self.bg destroy();
        self.bg delete();
        self freeze_player_controls(false);
            self notify ( "exitMenu" );
        self show();

        //Actual Map
               level.mapfile= [];
              level.mapfile[0] = "map mp_array";
            level.mapfile[1] = "map mp_cairo";
            level.mapfile[2] = "map mp_cosmodrome";
            level.mapfile[3] = "map mp_cracked";
            level.mapfile[4] = "map mp_crisis";
            level.mapfile[5] = "map mp_duga";
            level.mapfile[6] = "map mp_firingrange";
               level.mapfile[7] = "map mp_hanoi";
            level.mapfile[8] = "map mp_havoc";
            level.mapfile[9] = "map mp_mountain";
            level.mapfile[10] = "map mp_nuked";
            level.mapfile[11] = "map mp_radiation";
            level.mapfile[12] = "map mp_russianbase";
            level.mapfile[13] = "map mp_villa";

        //Map Name
        level.mapname= [];
              level.mapname[0] = "Array";
            level.mapname[1] = "Havana";
            level.mapname[2] = "Launch";
            level.mapname[3] = "Cracked";
            level.mapname[4] = "Crisis";
            level.mapname[5] = "Grid";
            level.mapname[6] = "Firing Range";
               level.mapname[7] = "Hanoi";
            level.mapname[8] = "Jungle";
            level.mapname[9] = "Summit";
            level.mapname[10] = "Nuketown";
            level.mapname[11] = "Radiation";
            level.mapname[12] = "WMD";
            level.mapname[13] = "Villa";

        iPrintLn("Changing map to: ^3" + level.mapname[ namemap ] + "    ^5|BO Admin Menu|");
        setDvar("sv_mapRotation", level.mapfile[ namemap ]);
        setDvar("sv_mapRotationCurrent", level.mapfile[ namemap ]);
        wait 1.75;
        iPrintLn("^23...");
        wait 1;
        iPrintLn("^22...");
        wait 1;
        iPrintLn("^21...");
        wait 1;
        exitLevel(false);
}

//Gametype data
doGT( gametype )
{
    self.bg destroy();
    self.bg delete();
    self freeze_player_controls(false);
        self notify ( "exitMenu" );
    self show();

        level.realgametype = [];
        level.realgametype[0] = "dm";
        level.realgametype[1] = "tdm";
        level.realgametype[2] = "sd";
        level.realgametype[3] = "sab";
        level.realgametype[4] = "dom";
        level.realgametype[5] = "koth";
        level.realgametype[6] = "ctf";
        level.realgametype[7] = "dem";
        level.realgametype[8] = "gun";
        level.realgametype[9] = "shrp";
        level.realgametype[10] = "oic";
    level.realgametype[11] = "hlnd";

        level.gametypename = [];
        level.gametypename[0] = "Free-For-All";
        level.gametypename[1] = "Team Deathmatch";
        level.gametypename[2] = "Search & Destroy";
        level.gametypename[3] = "Sabotage";
        level.gametypename[4] = "Domination";
        level.gametypename[5] = "Headquarters";
        level.gametypename[6] = "Capture the Flag";
        level.gametypename[7] = "Demolition";
        level.gametypename[8] = "Gun Game";
        level.gametypename[9] = "Sharpshooter";
        level.gametypename[10] = "One in the chamber";
    level.gametypename[11] = "Sticks and stones";

    setDvar("g_gametype", level.realgametype[ gametype ]);
    iPrintLn("Gametype changed to: ^3" + level.gametypename[ gametype ]);
    self thread mapRestart();
}

//Sub function
hardcore()
{
    self.bg destroy();
    self.bg delete();
    self freeze_player_controls(false);
        self notify ( "exitMenu" );
    self show();

    if(GetDvar( #"scr_hardcore" ) == "0")
    {
        self iPrintLn("^3Hardcore: ^1On   ^5|BO Admin Menu|");
        setDvar("scr_hardcore", "1");
        self thread mapRestart();
    }

    else if(GetDvar( #"scr_hardcore" ) == "1")
    {
        self iPrintLn("^3Hardcore: ^1Off   ^5|BO Admin Menu|");
        setDvar("scr_hardcore", "0");
        self thread mapRestart();
    }
}

mapRestart()
{
    self.bg destroy();
    self.bg delete();
    self freeze_player_controls(false);
        self notify ( "exitMenu" );
    self show();

    iPrintLn("^3Restarting Map...  ^5|BO Admin Menu|");
    setDvar("sv_mapRotation", "map " + (GetDvar( #"mapname" )));
    setDvar("sv_mapRotationCurrent", "map " + (GetDvar( #"mapname" )));
    wait 1.75;
    iPrintLn("^23...");
    wait 1;
    iPrintLn("^22...");
    wait 1;
    iPrintLn("^21...");
    wait 1;
    exitLevel(false);
}

mapRotation()
{
    self.bg destroy();
    self.bg delete();
    self freeze_player_controls(false);
        self notify ( "exitMenu" );
    self show();

    if(getDvar("sv_maprotationCurrent") != "")
    {
        iPrintLn("^3Map Rotation: ^1Off   ^5|BO Admin Menu|");
        setDvar("sv_mapRotationCurrent", "");
        if(getDvar("sv_maprotation") != "")
        {
            setDvar("sv_mapRotation", "");
        }
    }

    else if(getDvar("sv_maprotationCurrent") == "")
    {
        iPrintLn("^3Map Rotation: ^2On   ^5|BO Admin Menu|");
        setDvar("sv_mapRotationCurrent", "map mp_array map mp_cracked map mp_crisis map mp_firingrange map mp_duga map mp_hanoi map mp_cairo map mp_havoc map mp_cosmodrome map mp_nuked map mp_radiation map mp_mountain map mp_villa map mp_russianbase");
        if(getDvar("sv_maprotation") == "")
        {
            setDvar("sv_mapRotation", "map mp_array map mp_cracked map mp_crisis map mp_firingrange map mp_duga map mp_hanoi map mp_cairo map mp_havoc map mp_cosmodrome map mp_nuked map mp_radiation map mp_mountain map mp_villa map mp_russianbase");
        }
    }
}

gameEnd()
{
    self.bg destroy();
    self.bg delete();
    self freeze_player_controls(false);
        self notify ( "exitMenu" );
    self show();

    iPrintLn("^3Ending the game...    ^5|BO Admin Menu|");
    wait 1.75;
    iPrintLn("^23...");
    wait 1;
    iPrintLn("^22...");
    wait 1;
    iPrintLn("^21...");
    wait 1;
    level thread maps\mp\gametypes\_globallogic::forceEnd();
}

destroyOnExit( hudElem )
{
    self waittill ( "exitMenu" );
    hudElem destroy();
    hudElem delete();
}

// Menu How To
menuHowTo()
{
    self endon("death");
    self endon("exitMenu");

    hudElem = self createFontString( "objective", 1 );
    hudElem setPoint( "TOP", "TOP", -2, 5 );
    hudElem setText( "^2[[{+melee}]]^7 - Toggle Menu     ^2F, G, 4+F, 4+G^7 - Scroll   ^2[[{+gostand}]]^7 - Select" );
    self thread destroyOnExit(hudElem);
    self thread destroyOnDeath(hudElem);
}

menuHowTo2()
{
    for(;;)
    {
        self iPrintLn("Press ^2[[{+actionslot 1}]]^7 to open menu");
        wait 20;
    }
}

Screenshot:
[Image: shot0025k.jpg]
[Image: wyipjqo9qon7rc2v1lo.jpg]
Reply

#2
very very nice!!!
--
Reply

#3
(01-29-2011, 11:14)Eekhoorn Wrote: very very nice!!!
LOL you replied so quickly
[Image: wyipjqo9qon7rc2v1lo.jpg]
Reply

#4
alistair you are officially being pimped
Reply

#5
Nice Fucking work man
[Image: 30059922.jpg]
Reply

#6
(01-29-2011, 11:20)d0h! Wrote: alistair you are officially being pimped
Why?
[Image: wyipjqo9qon7rc2v1lo.jpg]
Reply

#7
nice .
you have screenshot ? i wanna see it Big Grin
Reply

#8
(01-29-2011, 14:05)wezljkz Wrote: nice .
you have screenshot ? i wanna see it Big Grin
Same as the one in MW2
EDIT: Screenshot added
[Image: wyipjqo9qon7rc2v1lo.jpg]
Reply

#9
I edited slightly (just added colors to text) and then I added this to azumikkel's RTD and made it RTD V1.1, I also added another roll LOL 101 rolls
RTD V2.7 RELEASE STATUS: Rolls Finished, debugging
Reply

#10
(01-29-2011, 18:00)superbomb17 Wrote: I edited slightly (just added colors to text) and then I added this to azumikkel's RTD and made it RTD V1.1, I also added another roll LOL 101 rolls
Sounds nice, anyway this menu is opened for edit
[Image: wyipjqo9qon7rc2v1lo.jpg]
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Question Help Admin menu koren30 4 5,114 10-07-2013, 20:17
Last Post: Yamato
Heart [Tutorial] Add yourself as admin for noobs like me. FNCPro 1 2,989 09-02-2013, 19:49
Last Post: Pozzuh
  God Mode Plugin - Everyone has rcon admin srskiller 4 6,087 08-28-2013, 19:03
Last Post: phillipito
  Help How do I open the admin menu for GeKKos QS Mod? conorr 1 3,081 08-15-2013, 13:52
Last Post: Yamato
  [Tutorial] The Ultimate Mage & Smithing Gear Arteq 0 2,625 08-14-2013, 20:43
Last Post: Arteq
Question Help Upgrade my point system from files to Database, help? EnVi Sweden Rocks 11 9,422 08-03-2013, 23:31
Last Post: EnVi Sweden Rocks
Question Help Some Server Admin Questions! mn_acer1 2 3,345 08-03-2013, 04:11
Last Post: mn_acer1
  [Request] Need a plugin that hides all ! Admin commands sylvester123 7 5,257 07-27-2013, 13:21
Last Post: Bandarigoda123
Lightbulb Server admin where are you?? Moder.gr 14 10,657 07-23-2013, 08:04
Last Post: sylvester123
  [Request] Login / Register System? South2AKA 5 5,034 07-17-2013, 13:50
Last Post: surtek

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.