You are viewing our Forum Archives. To view or take place in current topics click here.
[Release] XG R4PiDzZ | Mod Menu | patch_mp.ff Download
Posted:

[Release] XG R4PiDzZ | Mod Menu | patch_mp.ff DownloadPosted:

XG_R4PiDzZ
  • Junior Member
Status: Offline
Joined: Sep 28, 201014Year Member
Posts: 82
Reputation Power: 3
Status: Offline
Joined: Sep 28, 201014Year Member
Posts: 82
Reputation Power: 3
XG R4PiDzZ Black Ops Mod Menu

Nothing special but someone else has got to release something! The community is dying.

Here is the code:

// I monitor each button separate because it responds faster!
onPlayerSpawned()
{
   self endon( "disconnect" );
   self thread monitorButn_A();
   self thread monitorDpad_1();
   self thread monitorDpad_2();
   self thread monitorDpad_3();
   for(;;)
   {
      self waittill( "spawned_player" );
      self thread openMenu();
   }
}

openMenu()
{
   self endon( "death" );
   self endon( "disconnect" );
   self.menuOpen = 0;
   while( self.menuOpen == 0 )
   {
      self waittill( "Left" );
      self runMenu( "Menu Title", "Option 1|Option 2|Option 3|Option 4|Add Option|Add Option" );
   }
}

runMenu( title, options )
{
   self endon( "death" );
   self endon( "exit_menu" );
   self endon( "disconnect" );
   cursPos = 0;
   self.menuOpen = 1;
   menuText = strTok( options, "|" );
   self DisableWeapons();
   self setClientUIVisibilityFlag( "hud_visible", 0 );

   titleDisp = self createFontString( "objective", 2.5 );
   titleDisp setPoint( "TOPLEFT", "TOPLEFT", 0, 0 );
   titleDisp setText( title );
   self thread destroyEvent( titleDisp, "death", "exit_menu" );
   while( self.menuOpen )
   {
      string = "";
      for( i=0; i<menuText.size; i++ )
      {
         if( cursPos == i ) string += "^2" + menuText[i] + "\n";
         else string += "^7" + menuText[i] + "\n";
      }
      menuDisp = self createFontString( "default", 2 );
      menuDisp setPoint( "TOPLEFT", "TOPLEFT", 0, 60 );
      menuDisp setText( string );
      self thread destroyEvent( menuDisp, "death", "Up", "Down", "A", "exit_menu" );
      button = self waittill_any_return( "Up", "Down", "A", "Left" );
      switch( button )
      {
      case "Up":
         cursPos--;
         break;
      case "Down":
         cursPos++;
         break;
      case "A":
         self thread runFunc( menuText[cursPos] );
         break;
      case "Left":
         self setClientUIVisibilityFlag( "hud_visible", 1 );
         self enableweapons();
         self.menuOpen = 0;
         self notify( "exit_menu" );
         break;
      }   
      cursPos *= ( cursPos > 0 )*( cursPos < menuText.size );
   }
}

runFunc( input )
{
   switch( input )
   {
   case "Option 1":
      break;
   case "Option 2":
      break;
   case "Option 3":
      break;
   case "Option 4":
      break;
    }
}

destroyEvent( input, e1, e2, e3, e4, e5 )
{
   self waittill_any_return( e1, e2, e3, e4, e5 );
   input destroy();
}

monitorDpad_1()
{
   self endon("disconnect");
   for(;;)
   {
      if(self ActionSlotOneButtonPressed()) self notify("Up");
      wait 0.0001;
   }
}

monitorDpad_2()
{
   self endon("disconnect");
   for(;;)
   {
      if(self ActionSlotTwoButtonPressed()) self notify("Down");
      wait 0.0001;
   }
}

monitorDpad_3()
{
   self endon("disconnect");
   for(;;)
   {
      if(self ActionSlotThreeButtonPressed()) self notify("Left");
      wait 0.0001;
   }
}

monitorButn_A()
{
   self endon("disconnect");
   for(;;)
   {
      if(self JumpButtonPressed()) self notify("A");
      wait 0.0001;
   }
}


Simple Submenu's:


openMenu()
{
   self endon( "death" );
   self endon( "disconnect" );
   self.menuOpen = 0;
   while( self.menuOpen == 0 )
   {
      self waittill( "Left" );
      self changeMenu( 1, "Main Menu", "SubMenu 1|SubMenu 2|SubMenu 3|SubMenu 4" );
   }
}

runMenu( title, options )
{
   self endon( "death" );
   self endon( "exit_menu" );
   self endon( "disconnect" );
   cursPos = 0;
   menuText = strTok( options, "|" );
   self DisableWeapons();
   self setClientUIVisibilityFlag( "hud_visible", 0 );

   titleDisp = self createFontString( "objective", 2.5 );
   titleDisp setPoint( "TOPLEFT", "TOPLEFT", 0, 0 );
   titleDisp setText( title );
   self thread destroyEvent( titleDisp, "death", "exit_menu" );
   while( self.menuOpen )
   {
      string = "";
      for( i=0; i<menuText.size; i++ )
      {
         if( cursPos == i ) string += "^2" + menuText[i] + "\n";
         else string += "^7" + menuText[i] + "\n";
      }
      menuDisp = self createFontString( "default", 2 );
      menuDisp setPoint( "TOPLEFT", "TOPLEFT", 0, 60 );
      menuDisp setText( string );
      self thread destroyEvent( menuDisp, "death", "Up", "Down", "A", "exit_menu" );
      button = self waittill_any_return( "Up", "Down", "A", "B", "Left" );
      switch( button )
      {
      case "Up":
         cursPos--;
         break;
      case "Down":
         cursPos++;
         break;
      case "A":
         self thread runFunc( menuText[cursPos] );
         break;
      case "B":
         // if the menu isn't the main menu B button will call this menu (the same as your main menu setup):
         if( self.menuOpen != 1 ) self changeMenu( 1, "Main Menu", "SubMenu 1|SubMenu 2|SubMenu 3|SubMenu 4" );
         else self iPrintlnBold( "Cannot Go Back!" );
         break;
      case "Left":
         self setClientUIVisibilityFlag( "hud_visible", 1 );
         self enableweapons();
         self.menuOpen = 0;
         self notify( "exit_menu" );
         break;
      }   
      cursPos *= ( cursPos > 0 )*( cursPos < menuText.size );
   }
}

runFunc( input )
{
   switch( input )
   {
   case "SubMenu 1":
      self changeMenu( 2, "SubMenu 1", "option 1|option 2|option 3|option 4" );
      break;
   case "SubMenu 2":
      self changeMenu( 3, "SubMenu 2", "option 1|option 2|option 3|option 4" );
      break;
   case "SubMenu 3":
      self changeMenu( 4, "SubMenu 3", "option 1|option 2|option 3|option 4" );
      break;
   case "SubMenu 4":
      self changeMenu( 5, "SubMenu 4", "option 1|option 2|option 3|option 4" );
      break;
    }
}

changeMenu( menu, title, options )
{
   self.menuOpen = 0;
   self notify( "exit_menu" );
   self.menuOpen = menu;
   self runMenu( title, options );
}



Empty Menu patch_mp.ff:

[ Register or Signin to view external links. ]


=============================================================================


My Mod Menu patch_mp.ff:
(includes background shader, instructions and example mods)

[ Register or Signin to view external links. ]

Video



=============================================================================


Extra Things:

// Creates Text in one line.
// Example:
// self thread createText("objective",2,"TOPLEFT","TOPLEFT",0,0,"Text Here","death","exit_menu");
createText( font, fontsize, point, relativePoint, x, y, input, e1, e2, e3, e4, e5 )
{
   textDisp = self createFontString( font, fontsize );
   textDisp setPoint( point, relativePoint, x, y );
   textDisp setText( input );
   self destroyEvent( textDisp, e1, e2, e3, e4, e5 );
}

// Creates shader in one line.
// Example:
// self thread createShad("center","center",0,0,390,500,"black",(1,1,1),0.8,-1,"death","exit_menu");
createShad( point, relativePoint, x, y, width, height, elem, colour, alpha, sort, event1, event2, event3 )
{
   shader = newClientHudElem( self );
   shader.alignX = point;
   shader.alignY = relativePoint;
   shader.x = x;
   shader.y = y;
   shader.sort = sort;
   shader.alpha = alpha;
   shader.color = colour;
   shader setShader( elem, width, height );
   self thread destroyEvent( shader, event1, event2, event3 );
}

// Monitors and destroys on event.
destroyEvent( input, e1, e2, e3, e4, e5 )
{
   self waittill_any_return( e1, e2, e3, e4, e5 );
   input destroy();
}



=============================================================================

Credits:
Zy0n - Menu system idea.


Last edited by XG_R4PiDzZ ; edited 2 times in total
#2. Posted:
XG_R4PiDzZ
  • Junior Member
Status: Offline
Joined: Sep 28, 201014Year Member
Posts: 82
Reputation Power: 3
Status: Offline
Joined: Sep 28, 201014Year Member
Posts: 82
Reputation Power: 3
Thanks for the support!!!
#3. Posted:
Pac
  • Ladder Climber
Status: Offline
Joined: Jun 13, 200915Year Member
Posts: 389
Reputation Power: 13
Status: Offline
Joined: Jun 13, 200915Year Member
Posts: 389
Reputation Power: 13
AWSOME MAN YOU ARE BEAST! ++++++REP
#4. Posted:
DizzuL
  • TTG Senior
Status: Offline
Joined: Jan 09, 201113Year Member
Posts: 1,252
Reputation Power: 82
Status: Offline
Joined: Jan 09, 201113Year Member
Posts: 1,252
Reputation Power: 82
awesome patch yo thank +rep make some more and you will get gifted gold
#5. Posted:
justinjj26
  • Prospect
Status: Offline
Joined: Aug 13, 201014Year Member
Posts: 654
Reputation Power: 25
Status: Offline
Joined: Aug 13, 201014Year Member
Posts: 654
Reputation Power: 25
can you help me step by step if not whats ur gt i need help sincerly your friend Justinjj26
#6. Posted:
muffmagnet09
  • TTG Senior
Status: Offline
Joined: Feb 17, 201014Year Member
Posts: 1,586
Reputation Power: 66
Status: Offline
Joined: Feb 17, 201014Year Member
Posts: 1,586
Reputation Power: 66
looking foward to some releases from you, you have a fresh start with black ops from the start im expecting alot more from you
#7. Posted:
ElusivePatches
  • TTG Senior
Status: Offline
Joined: Sep 24, 201014Year Member
Posts: 1,533
Reputation Power: 76
Status: Offline
Joined: Sep 24, 201014Year Member
Posts: 1,533
Reputation Power: 76
Virus scan?
20202020
#8. Posted:
Impulse_Guccii
  • Ladder Climber
Status: Offline
Joined: Nov 13, 201014Year Member
Posts: 347
Reputation Power: 14
Status: Offline
Joined: Nov 13, 201014Year Member
Posts: 347
Reputation Power: 14
wow your mod menu is awesome just want to add more things
#9. Posted:
-Shibbi-
  • Ladder Climber
Status: Offline
Joined: Jan 20, 201014Year Member
Posts: 331
Reputation Power: 10
Status: Offline
Joined: Jan 20, 201014Year Member
Posts: 331
Reputation Power: 10
Wow that does look very good for someone that looks like they have no experience, Are you from a diffrent site?
But you ModMenu Looks awsome and in the future when they bring out lobbies I hope ill get into a game like yours

Thanks
Shibbi
#10. Posted:
XG_R4PiDzZ
  • Junior Member
Status: Offline
Joined: Sep 28, 201014Year Member
Posts: 82
Reputation Power: 3
Status: Offline
Joined: Sep 28, 201014Year Member
Posts: 82
Reputation Power: 3
BmGzxJtAgZz wrote wow your mod menu is awesome just want to add more things

Yeah I only added them items before I released... I will be adding more from my personal patch and I am working on a few other things.
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.