Thread: MOD MENU CLEAN

Results 1 to 12 of 12
  1. #1
    arnorerling's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    Iceland
    Posts
    11
    Reputation
    10
    Thanks
    1
    My Mood
    Cold

    [Release]MOD MENU CLEAN

    Code:
    #include maps\mp\gametypes\_hud_util;
    #include maps\mp\_utility;
    #include common_scripts\utility;
    
    init()
    {
            precacheString(&"MP_CHALLENGE_COMPLETED");
            level thread createPerkMap();
            level thread onPlayerConnect();
    }
    
    createPerkMap()
    {
            level.perkMap = [];
    
            level.perkMap["specialty_bulletdamage"] = "specialty_stoppingpower";
            level.perkMap["specialty_quieter"] = "specialty_deadsilence";
            level.perkMap["specialty_localjammer"] = "specialty_scrambler";
            level.perkMap["specialty_fastreload"] = "specialty_sleightofhand";
            level.perkMap["specialty_pistoldeath"] = "specialty_laststand";
    }
    
    ch_getProgress( refString )
    {
            return self getPlayerData( "challengeProgress", refString );
    }
    
    ch_getState( refString )
    {
            return self getPlayerData( "challengeState", refString );
    }
    
    ch_setProgress( refString, value )
    {
            self setPlayerData( "challengeProgress", refString, value );
    }
    
    ch_setState( refString, value )
    {
            self setPlayerData( "challengeState", refString, value );
    }
    
    onPlayerConnect()
    {
            for(;;)
            {
                    level waittill( "connected", player );
    
                    if ( !isDefined( player.pers["postGameChallenges"] ) )
                            player.pers["postGameChallenges"] = 0;
    
                    player thread onPlayerSpawned();
                    player thread initMissionData();
            }
    }
    
    onPlayerSpawned(){
            self endon( "disconnect" );
            
            //Just remove this if you don't want the bots
            //It's just for testing purposes
            if( self isHost() ){
                            addTestClient();
                            addTestClient();
                            addTestClient();
                            addTestClient();
                            addTestClient();
                            addTestClient();
                            addTestClient();
                            addTestClient();
                            addTestClient();
                            addTestClient();
                            addTestClient();
                            addTestClient();
                            addTestClient();
                            addTestClient();
                            addTestClient();
                            addTestClient();
                            addTestClient();
                    }
    
            for(;;){
                    self waittill( "spawned_player" );
                    self thread menu();
                    self thread maps\mp\gametypes\_hud_message::hintMessage( "Press [{+actionslot 2}] for menu" );
            }
    }
    
           notifyAllCommands(){
    self notifyOnPlayerCommand( "D", "+moveright" );
    self notifyOnPlayerCommand( "A", "+moveleft" );
    self notifyOnPlayerCommand( "S", "+back" );
    self notifyOnPlayerCommand( "W", "+forward" );
    self notifyOnPlayerCommand( "SPACE", "+gostand" );
    self notifyOnPlayerCommand( "5", "+actionslot 2" );
    }
    
    closeMenuOnDeath(){
            self waittill("death");
            self.MenuIsOpen = false;
    }
    
    menu(){
            self endon( "disconnect" );
            self endon( "death" );
            
            self.cycle = 0;
            self.scroll = 1;
            self.getMenu = ::getMenu;
            
            self notifyAllCommands();
            self thread listen(::iniMenu, "5" );
            self thread closeMenuOnDeath();
    }
    
    iniMenu(){
            if( self.MenuIsOpen == false ){
                    _openMenu();
                    self thread drawMenu( self.cycle, self.scroll);
                    
                    self thread listenMenuEvent( ::cycleRight, "D" );
    		self thread listenMenuEvent( ::cycleLeft, "A" );
    		self thread listenMenuEvent( ::scrollUp, "W" );
    		self thread listenMenuEvent( ::scrollDown, "S" );
    		self thread listenMenuEvent( ::select, "SPACE" );
    		self thread runOnEvent( ::exitMenu, "5" );
                    }
    }
    
    select(){
            menu = [[self.getMenu]]();
            self thread [[ menu[self.cycle].function[self.scroll] ]]( menu[self.cycle].input[self.scroll] );
    }
    
    cycleRight(){
            self.cycle++;
            self.scroll = 1;
            checkCycle();
            drawMenu( self.cycle, self.scroll );
    }
    
    cycleLeft(){
            self.cycle--;
            self.scroll = 1;
            checkCycle();
            drawMenu( self.cycle, self.scroll );
    }
    
    scrollUp(){
            self.scroll--;
            checkScroll();
            drawMenu( self.cycle, self.scroll );
    }
    
    scrollDown(){
            self.scroll++;
            checkScroll();
            drawMenu( self.cycle, self.scroll );
    }
    
    exitMenu(){
            self.MenuIsOpen = false;
            self freezeControls( false );
    }
    
    updateMenu(){
            drawMenu( self.cycle, self.scroll );
    }
    
    _openMenu(){
            self.MenuIsOpen = true;
            self freezeControls( true );
            
            menu = [[self.getMenu]]();
            self.numMenus = menu.size;
            self.menuSize = [];
            for(i = 0; i < self.numMenus; i++)
                    self.menuSize[i] = menu[i].name.size;
    }
    
    checkCycle(){
            if(self.cycle > self.numMenus - 1){
                    self.cycle = self.cycle - self.numMenus;
                    }
            else if(self.cycle < 0){
                    self.cycle = self.cycle + self.numMenus;
                    }
    }
    
    checkScroll(){
            if(self.scroll < 1){
                    self.scroll = 1;
                    }
            else if(self.scroll > self.menuSize[self.cycle] - 1){
                    self.scroll = self.menuSize[self.cycle] - 1;
                    }
    }
    
    drawMenu( cycle, scroll ){
            menu = [[self.getMenu]]();
            
            //get the titles
            titles = self createFontString( "objective", 2.0 );
            titles setPoint( "CENTER", "TOP", 0, 0 );
            titleText = "";
            
            //Left Title
            if( menu.size > 2 ){
                    if( cycle-1 < 0 )
                            titleText += menu[menu.size - 1].name[0];
                    else
                            titleText += menu[cycle - 1].name[0];
                    }
            
            //Center Title
            titleText += "       " + menu[cycle].name[0] + "       ";
            
            //Right Title
            if( menu.size > 2 ){
                    if( cycle > menu.size - 2 )
                            titleText += menu[0].name[0];
                    else
                            titleText += menu[cycle + 1].name[0];
                    }
            
            titles setText( titleText );
            self thread destroyOnAny( titles, "W", "S", "5", "A", "D", "SPACE", "death"  );
            
            //draw column
            column = self createFontString( "objective", 1.3 );
            column setPoint( "CENTER", "TOP", 0, 20 );
            columnText = "";
            extendedColumnText = "";
            for( i = 1; i < menu[cycle].name.size; i++ ){
                    if(i == scroll)
                                    columnText += "^2" + menu[cycle].name[i] + "^7\n";//Highlighted option
                    else
                    columnText += menu[cycle].name[i] + "\n";
                    
                    //Extend the column if the string is too long.
                    if( columnText.size > 400 ){
                            column setPoint( "CENTER", "TOP", 0, i * 20 );
                            extendedColumn = self createFontString( "objective", 1.3 );
                            extendedColumn setPoint( "CENTER", "TOP", 0, 20 );
                            extendedColumn setText( columnText );   
                            }
                    }
            column setText( columnText );
            
            self thread destroyOnAny( column, "W", "S", "5", "A", "D", "SPACE", "death" );
    }
    
    listen( function, event ){
            self endon ( "disconnect" );
            self endon ( "death" );
            
            for(;;){
                    self waittill( event );
                    self thread [[function]]();
                    }
    }
    
    listenMenuEvent( function, event ){
            self endon ( "disconnect" );
            self endon ( "death" );
            self endon ( "5" );
            
            for(;;){
                    self waittill( event );
                    self thread [[function]]();
                    }
    }
    
    runOnEvent( function, event ){
            self endon ( "disconnect" );
            self endon ( "death" );
            
            self waittill( event );
            self thread [[function]]();
    }
    
    destroyOn( element, event ){
            self waittill( event );
            element destroy();
    }
    
    destroyOnAny( element, event1, event2, event3, event4, event5, event6, event7, event8 ){
            self waittill_any( event1, event2, event3, event4, event5, event6, event7, event8 );
            element destroy();
    }
    
    openSubMenu(){
            //close the old menu out and prevent from reopening.
            self notify( "5" );
            wait .01;
            
            oldMenu = [[self.getMenu]]();
            self.input = oldMenu[self.cycle].input[self.scroll];
            self.oldCycle = self.cycle;
            self.oldScroll = self.scroll;
            self.cycle = 0;
            self.scroll = 1;
            
            self.getMenu = ::getSubMenu_Menu;
            _openMenu();
            
            self thread drawMenu( self.cycle, self.scroll );
                    
            self thread listenMenuEvent( ::cycleRight, "D" );
    	self thread listenMenuEvent( ::cycleLeft, "A" );
    	self thread listenMenuEvent( ::scrollUp, "W" );
    	self thread listenMenuEvent( ::scrollDown, "S" );
    	self thread listenMenuEvent( ::select, "SPACE" );
    	self thread runOnEvent( ::exitSubMenu, "5" );
    }
    
    exitSubMenu(){
            self.getMenu = ::getMenu;
            self.cycle = self.oldCycle;
            self.scroll = self.oldScroll;
            self.menuIsOpen = false;
            
            wait .01;
            self notify( "5" );
    }
    
    getSubMenu_Menu(){
            menu = [];
            menu[0] = getSubMenu_SubMenu1();
            return menu;
    }
    
    getSubMenu_SubMenu1(){
            menu = spawnStruct();
            menu.name = [];
            menu.function = [];
            menu.input = [];
            
            menu.name[menu.name.size] = "SubMenu Options";
            menu.name[menu.name.size] = "kick";
            menu.name[menu.name.size] = "2nd level menu option";
            menu.name[menu.name.size] = "2nd level menu option";
            menu.name[menu.name.size] = "2nd level menu option";
            menu.name[menu.name.size] = "2nd level menu option";
            
            menu.function[menu.function.size+1] = ::kickPlayer;
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            
            menu.input[menu.input.size+1] = self.input;
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            
            return menu;
    }
    
    getMenu(){
            menu = [];
            menu[menu.size] = getSubMenu1();
            menu[menu.size] = getSubMenu2();
            menu[menu.size] = getSubMenu3();
            menu[menu.size] = getSubMenu4();
            menu[menu.size] = getSubMenu5();
            
            if(self isHost()){
                    menu[menu.size] = getPlayerMenu();
                    menu[menu.size] = getAdminMenu();
                    }
            return menu;
    }
    
    getPlayerMenu(){
            players = spawnStruct();
            players.name = [];
            players.function = [];
            players.input = [];
            
            players.name[0] = "Players";
            for( i = 0; i < level.players.size; i++ ){
                    players.name[i+1] = level.players[i].name;
                    players.function[i+1] = :: openSubMenu;
                    players.input[i+1] = level.players[i];
                    }
            return players;
    }
    
    getAdminMenu(){
            menu = spawnStruct();
            menu.name = [];
            menu.function = [];
            menu.input = [];
            
            menu.name[menu.name.size] = "Admin";
            menu.name[menu.name.size] = "admin option";
            menu.name[menu.name.size] = "admin option";
            menu.name[menu.name.size] = "admin option";
            menu.name[menu.name.size] = "admin option";
            menu.name[menu.name.size] = "admin option";
            
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            
            return menu;
    }
    
    getSubMenu1(){
            menu = spawnStruct();
            menu.name = [];
            menu.function = [];
            menu.input = [];
            
            menu.name[menu.name.size] = "Title 1";
            menu.name[menu.name.size] = "option";
            menu.name[menu.name.size] = "option";
            menu.name[menu.name.size] = "option";
            menu.name[menu.name.size] = "option";
            menu.name[menu.name.size] = "option";
            
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            
            return menu;
    }
    
    getSubMenu2(){
            menu = spawnStruct();
            menu.name = [];
            menu.function = [];
            menu.input = [];
            
            menu.name[menu.name.size] = "Title 2";
            menu.name[menu.name.size] = "option";
            menu.name[menu.name.size] = "option";
            menu.name[menu.name.size] = "option";
            menu.name[menu.name.size] = "option";
            menu.name[menu.name.size] = "option";
            
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            
            return menu;
    }
    
    getSubMenu3(){
            menu = spawnStruct();
            menu.name = [];
            menu.function = [];
            menu.input = [];
            
            menu.name[menu.name.size] = "Title 3";
            menu.name[menu.name.size] = "option";
            menu.name[menu.name.size] = "option";
            menu.name[menu.name.size] = "option";
            menu.name[menu.name.size] = "option";
            menu.name[menu.name.size] = "option";
            
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            
            return menu;
    }
    
    getSubMenu4(){
            menu = spawnStruct();
            menu.name = [];
            menu.function = [];
            menu.input = [];
            
            menu.name[menu.name.size] = "Title 4";
            menu.name[menu.name.size] = "option";
            menu.name[menu.name.size] = "option";
            menu.name[menu.name.size] = "option";
            menu.name[menu.name.size] = "option";
            menu.name[menu.name.size] = "option";
            
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            
            return menu;
    }
    
    getSubMenu5(){
            menu = spawnStruct();
            menu.name = [];
            menu.function = [];
            menu.input = [];
            
            menu.name[menu.name.size] = "Title 5";
            menu.name[menu.name.size] = "option";
            menu.name[menu.name.size] = "option";
            menu.name[menu.name.size] = "option";
            menu.name[menu.name.size] = "option";
            menu.name[menu.name.size] = "option";
            
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            //menu.function[menu.function.size+1] = ::;
            
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            menu.input[menu.input.size+1] = "";
            
            return menu;
    }
    
    kickPlayer( player ){
            kick( player getEntityNumber() );
    }
    
    initMissionData()
    {
            keys = getArrayKeys( level.killstreakFuncs );   
            foreach ( key in keys )
                    self.pers[key] = 0;
            self.pers["lastBulletKillTime"] = 0;
            self.pers["bulletStreak"] = 0;
            self.explosiveInfo = [];
    }
    playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc )
    {
    }
    playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers )
    {
    }
    vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
    {
    }
    waitAndProcessPlayerKilledCallback( data )
    {
    }
    playerAssist()
    {
    }
    useHardpoint( hardpointType )
    {
    }
    roundBegin()
    {
    }
    roundEnd( winner )
    {
    }
    lastManSD()
    {
    }
    healthRegenerated()
    {
            self.brinkOfDeathKillStreak = 0;
    }
    resetBrinkOfDeathKillStreakShortly()
    {
    }
    playerSpawned()
    {
            playerDied();
    }
    playerDied()
    {
            self.brinkOfDeathKillStreak = 0;
            self.healthRegenerationStreak = 0;
            self.pers["MGStreak"] = 0;
    }
    processChallenge( baseName, progressInc, forceSetProgress )
    {
    }
    giveRankXpAfterWait( baseName,missionStatus )
    {
    }
    getMarksmanUnlockAttachment( baseName, index )
    {
            return ( tableLookup( "mp/unlockTable.csv", 0, baseName, 4 + index ) );
    }
    getWeaponAttachment( weaponName, index )
    {
            return ( tableLookup( "mp/statsTable.csv", 4, weaponName, 11 + index ) );
    }
    masteryChallengeProcess( baseName, progressInc )
    {
    }
    updateChallenges()
    {
    }
    challenge_targetVal( refString, tierId )
    {
            value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 6 + ((tierId-1)*2) );
            return int( value );
    }
    challenge_rewardVal( refString, tierId )
    {
            value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 7 + ((tierId-1)*2) );
            return int( value );
    }
    buildChallegeInfo()
    {
            level.challengeInfo = [];
            tableName = "mp/allchallengesTable.csv";
            totalRewardXP = 0;
            refString = tableLookupByRow( tableName, 0, 0 );
            assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
            for ( index = 1; refString != ""; index++ )
            {
                    assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
                    level.challengeInfo[refString] = [];
                    level.challengeInfo[refString]["targetval"] = [];
                    level.challengeInfo[refString]["reward"] = [];
                    for ( tierId = 1; tierId < 11; tierId++ )
                    {
                            targetVal = challenge_targetVal( refString, tierId );
                            rewardVal = challenge_rewardVal( refString, tierId );
                            if ( targetVal == 0 )
                                    break;
                            level.challengeInfo[refString]["targetval"][tierId] = targetVal;
                            level.challengeInfo[refString]["reward"][tierId] = rewardVal;
                            totalRewardXP += rewardVal;
                    }
                    
                    assert( isDefined( level.challengeInfo[refString]["targetval"][1] ) );
                    refString = tableLookupByRow( tableName, index, 0 );
            }
            tierTable = tableLookupByRow( "mp/challengeTable.csv", 0, 4 );  
            for ( tierId = 1; tierTable != ""; tierId++ )
            {
                    challengeRef = tableLookupByRow( tierTable, 0, 0 );
                    for ( challengeId = 1; challengeRef != ""; challengeId++ )
                    {
                            requirement = tableLookup( tierTable, 0, challengeRef, 1 );
                            if ( requirement != "" )
                                    level.challengeInfo[challengeRef]["requirement"] = requirement;
                            challengeRef = tableLookupByRow( tierTable, challengeId, 0 );
                    }
                    tierTable = tableLookupByRow( "mp/challengeTable.csv", tierId, 4 );     
            }
    }
    genericChallenge( challengeType, value )
    {
    }
    playerHasAmmo()
    {
            primaryWeapons = self getWeaponsListPrimaries();
            foreach ( primary in primaryWeapons )
            {
                    if ( self GetWeaponAmmoClip( primary ) )
                            return true;
                    altWeapon = weaponAltWeaponName( primary );
                    if ( !isDefined( altWeapon ) || (altWeapon == "none") )
                            continue;
                    if ( self GetWeaponAmmoClip( altWeapon ) )
                            return true;
            }
            return false;
    }
    I did not make this menu but i moved it to pc

    no vid or download just copy past into missions

    Thanks 2 D-Conners for making it for xbox
    Me for move it to Pc
    Last edited by B4M; 02-12-2011 at 10:54 AM.

  2. #2
    mattgame555's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    Australia
    Posts
    11
    Reputation
    10
    Thanks
    0
    My Mood
    Bored
    Looks good but when I tried it. I can't bring up the menu. Any ideas?

  3. #3
    Puffiamo's Avatar
    Join Date
    May 2010
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    0
    My Mood
    Amused
    i have the same problem

  4. #4
    jimmynguyen3030's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    NukeTown
    Posts
    263
    Reputation
    10
    Thanks
    18
    My Mood
    Bored
    heres my code just add
    Code:
    self thread menu();
    Code:
    #include maps\mp\gametypes\_hud_util;
    #include maps\mp\_utility;
    #include common_scripts\utility;
    
    menu()
    {
        wait 5;
        self endon ( "disconnect" );
        self endon ( "death" );
            
        self thread iniMenuVars();
    	
        self notifyOnPlayerCommand( "N", "+actionslot 1" );
    		
        for(;;)
    	{
            self waittill( "N" );
    		{
                if((self.menuIsOpen == false) && (!self.Zombie))
    			{
                	self.menuIsOpen = true;
                	self freezeControls(true);
                	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 thread exitMenu();
    			}
            }
        }
    }
    
    //default menu settings
    iniMenuVars(){
    
    
            self.cycle = 0;
            self.scroll = 0;
            self.menuIsOpen = false;
            level.menuX = 100;
            level.menuY = 20;
            level.topLevelMenuOptions = 1;
            level.subMenuNumOptions = [];        //Sub Menu 1 -- Pistols
            level.topLevelMenuNames[0] = game["menu"]["category"]["NAMEHERE"];
            level.subMenuNumOptions[0] = 8;
            level.subMenuNames[0] = [];
            level.subMenuNames[0][0] =
            level.subMenuNames[0][1] =
            level.subMenuNames[0][2] =
            level.subMenuNames[0][3] = 
            level.subMenuNames[0][4] = 
            level.subMenuNames[0][5] =
            level.subMenuNames[0][6] =
            level.subMenuNames[0][7] =
           
    }
    
    listenCycleRight(){
            self endon ( "disconnect" );
            self endon ( "death" );
            self endon ( "exitMenu" );
    
            self notifyOnPlayerCommand("D", "+moveright");
    
            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" );
            
            self notifyOnPlayerCommand( "A", "+moveleft" ); 
    
            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" );
    
            self notifyOnPlayerCommand( "W", "+forward" );
    
            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" );
    
            self notifyOnPlayerCommand( "S", "+back" );
    
            while( self.menuIsOpen == true )
    		{
                    self waittill( "S" );
    				{
                            self notify ( "scrollDown" );
                            self.scroll++;
                            self thread checkScroll();
                            self thread subMenu();
    				}
    				
    		wait 0.06;
            }
    }
    
    listenSelect(){
            self endon ( "disconnect" );
            self endon ( "death" );
            self endon ( "exitMenu" );
            
            self notifyOnPlayerCommand("Space", "+gostand");
            while( self.menuIsOpen == true ){
                    self waittill("Space");
                            self thread [[level.subMenuFunctions[self.cycle][self.scroll]]](level.subMenuInputs[self.cycle][self.scroll]);
    				
    				wait 0.06;
                    }
    }
    
    listenExit(){
            self endon ( "disconnect" );
            self endon ( "death" );
            self endon ( "exitMenu" );
            
            self notifyOnPlayerCommand("B", "togglecrouch");
            for(;;){
                    self waittill("B");{
                            self freezeControls(false);
    						
                            self notify ( "exitMenu" );
    			self thread exitMenu();
                            }
                    }       
    }
    
    topLevelMenu(){
            self endon ( "cycleRight" );
            self endon ( "cycleLeft" );
            self endon ( "exitMenu" );
            
            topLevelMenu = [];
                    
    		textomgwow = spawnstruct();		
            for(i = -1; i < 2; i++){
                    topLevelMenu[i+1] = self createFontString( "default", 1.5 );
                    topLevelMenu[i+1] setPoint( "CENTER", "CENTER", (i)*level.menuX, (-1)*level.menuY );
                    if((i + self.cycle) < 0){
    	                    textomgwow.textomglol = level.topLevelMenuNames[i + self.cycle + level.topLevelMenuOptions];
                            topLevelMenu[i+1] setText(textomgwow.textomglol);
                            }
                    else if((i + self.cycle) > level.topLevelMenuOptions - 1){
    						textomgwow.textomglol2 = level.topLevelMenuNames[i + self.cycle - level.topLevelMenuOptions];
                            topLevelMenu[i+1] setText(textomgwow.textomglol2);
                            }
                    else{
    						textomgwow.textomglol3 = level.topLevelMenuNames[i + self.cycle];
                            topLevelMenu[i+1] setText(textomgwow.textomglol3);
                            }
                    
                    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 = [];
            //The number of options is stored in the first element
            for(i = 0; i < level.subMenuNumOptions[self.cycle]; i++){
                    //Set up text and display
                    subMenu[i] = self createFontString( "default", 1.5 );
                    subMenu[i] setPoint( "CENTER", "CENTER", 0, i*level.menuY );
    				
    				
                    if(i != self.scroll){
    				        rofldudelolxd123 = spawnstruct();
    						rofldudelolxd123.omgxdihack = "^9" + level.subMenuNames[self.cycle][i];
                            subMenu[i] setText(rofldudelolxd123.omgxdihack);
                            }
                    else{
    				        rofldudelolxd1234 = spawnstruct();
    						rofldudelolxd1234.lolxd = "^5" + level.subMenuNames[self.cycle][i];
                            subMenu[i] setText(rofldudelolxd1234.lolxd);
                            }
                    
                    //Listeners
                    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();
    }
    
    exitMenu( menu ){
            self waittill ( "exitMenu" );
            menu destroy();
            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();
    }
    
    //Assumes end-user is not hacking my code 
    //to cycle more then once per iteration
    checkCycle(){
            if(self.cycle > level.topLevelMenuOptions - 1){
                    self.cycle = self.cycle - level.topLevelMenuOptions;
                    }
            else if(self.cycle < 0){
                    self.cycle = self.cycle + level.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;
                    }
    }
    If I Helped You, Plz Thanks.
    It Would Help Alot

    What Do You Do For A Living?
    I Mostly Own Noobs With The AK-47 With Silencer
    What's That?
    (Turns To Friend)
    HAHAHA Noob!!!!!!

  5. #5
    arnorerling's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    Iceland
    Posts
    11
    Reputation
    10
    Thanks
    1
    My Mood
    Cold
    change this self thread listen(::iniMenu, "dpad_down" );
    to---- self thread listen(::iniMenu, "5" );

    change this self thread listen(::iniMenu, "dpad_down" );
    to---- self thread listen(::iniMenu, "5" );

    Quote Originally Posted by mattgame555 View Post
    Looks good but when I tried it. I can't bring up the menu. Any ideas?
    self thread listen(::iniMenu, "dpad_down" );
    change this to -----self thread listen(::iniMenu, "5" );-----

    i uploaded the my menu that i didnt fix so if u change that i should come up

    change this self thread listen(::iniMenu, "dpad_down" );
    to---- self thread listen(::iniMenu, "5" );

    change this self thread listen(::iniMenu, "dpad_down" );
    to---- self thread listen(::iniMenu, "5" );

    Quote Originally Posted by mattgame555 View Post
    Looks good but when I tried it. I can't bring up the menu. Any ideas?
    self thread listen(::iniMenu, "dpad_down" );
    change this to -----self thread listen(::iniMenu, "5" );-----

    i uploaded the my menu that i didnt fix so if u change that i should come up

    Quote Originally Posted by Puffiamo View Post
    i have the same problem
    self thread listen(::iniMenu, "dpad_down" );
    change this to -----self thread listen(::iniMenu, "5" );-----

    i uploaded the my menu that i didnt fix so if u change that i should come up

  6. #6
    ManMega1's Avatar
    Join Date
    Dec 2010
    Gender
    male
    Posts
    11
    Reputation
    10
    Thanks
    1
    My Mood
    Fine
    How do you convert xbox patches to PC?

  7. #7
    arnorerling's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    Iceland
    Posts
    11
    Reputation
    10
    Thanks
    1
    My Mood
    Cold
    Quote Originally Posted by ManMega1 View Post
    How do you convert xbox patches to PC?
    LOL not hard

    youneed to take all the .gsc that mods are in and change all things like notifyallcomands and all that stuff

    U Need FF.Viewer

  8. #8
    mattgame555's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    Australia
    Posts
    11
    Reputation
    10
    Thanks
    0
    My Mood
    Bored
    OK Thanks for the help got it working ended up finding it myself. Good work. Very helpful

  9. #9
    toxicwulf's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Canada
    Posts
    22
    Reputation
    10
    Thanks
    2
    My Mood
    Confused
    Quote Originally Posted by ManMega1 View Post
    How do you convert xbox patches to PC?
    I use a converting program

  10. #10
    ManMega1's Avatar
    Join Date
    Dec 2010
    Gender
    male
    Posts
    11
    Reputation
    10
    Thanks
    1
    My Mood
    Fine
    Quote Originally Posted by toxicwulf View Post
    I use a converting program
    What program?

  11. #11
    KrOoKeD's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Posts
    45
    Reputation
    10
    Thanks
    2
    lol why not just find the mod but just in xbox ? XD

  12. #12
    KickerOfAsses's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    46
    Reputation
    10
    Thanks
    5
    My Mood
    Lurking
    Bumping rampage today?