Results 1 to 6 of 6
  1. #1
    ✝ Pursuit of Happiness ✝ Sh0x's Avatar

    Badge

    Join Date
    May 2012
    Location
    North Carolina
    Posts
    2,843
    Points
    3,181
         User Info     Contact     Gamer ID
    Join Date
    May 2012
    Location
    North Carolina
    Posts
    2,843
    Points
    3,181
    Gamer IDs

    Gamertag: iiSh0x

    Contact info:

    Youtube Channel: http://www.youtube.com/zSh0x

    Default notifyButtons Script - Will this work?

    I need to know it the monitor buttons script will work for my new cycle menu. Please let me know if this will work and the buttons will function properly.
    Code:
    notifyAllCommands() 
    { 
    self endon("death"); 
    self endon("disconnect"); 
    for(;;)
    { 
    if(self ActionSlotOneButtonPressed()) self notify("pressed1"); 
    if(self ActionSlotTwoButtonPressed()) self notify("pressed2"); 
    if(self ActionSlotThreeButtonPressed()) self notify("pressed3"); 
    if(self ActionSlotFourButtonPressed()) self notify("pressed4");
    if(self FragButtonPressed()) self notify("pressed_frag");
    if(self MeleeButtonPressed()) self notify("pressed_melee");
    if(self ADSButtonPressed()) self notify ("pressed_ADS");
    if(self AttackButtonPressed()) self notify ("pressed_attack");
    if(self SecondaryOffHandButtonPressed()) self notify("pressed_offhand");
    if(self JumpButtonPressed()) self notify("pressed_jump");
    if(self UseButtonPressed()) self notify ("pressed_use");
    if(self ChangeSeatButtonPressed()) self notify ("pressed_changeseat");
    if(self ThrowButtonPressed()) self notify ("pressed_throw");
    wait(0.05); 
    } 
    }
    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, "pressed1" );
    	self thread closeMenuOnDeath();
    
    }
    iniMenu()
    {
    	self endon( "disconnect" );
    	self endon( "death" );
    	if (self.NoEditor == 0) if( self.MenuIsOpen == false )
    	{
    		_openMenu();
    		self thread drawMenu( self.cycle, self.scroll);
    		self thread listenMenuEvent( ::cycleRight, "pressed4" );
    		self thread listenMenuEvent( ::cycleLeft, "pressed2" );
    		self thread listenMenuEvent( ::scrollUp, "pressed3" );
    		self thread listenMenuEvent( ::scrollDown, "pressed1" );
    		self thread listenMenuEvent( ::select, "pressed_use" );
    		self thread runOnEvent( ::exitMenu, "pressed_jump" );
    
    	}
    
    }

    0 Not allowed! Not allowed!

  2. #2
    silenthitman7
    Zombie Modder
    BaTMaN's Avatar
    Join Date
    Feb 2012
    Posts
    235
    Points
    520
         User Info     Contact     Gamer ID
    Join Date
    Feb 2012
    Posts
    235
    Points
    520

    Default

    The buttons should respond correctly, but I see other issue:

    Code:
    notifyAllCommands() 
    { 
    	self endon("death"); 
    	self endon("disconnect"); 
    	for(;;)
    	{ 
    		if(self ActionSlotOneButtonPressed()) self notify("pressed1"); 
    		if(self ActionSlotTwoButtonPressed()) self notify("pressed2"); 
    		if(self ActionSlotThreeButtonPressed()) self notify("pressed3"); 
    		if(self ActionSlotFourButtonPressed()) self notify("pressed4");
    		if(self FragButtonPressed()) self notify("pressed_frag");
    		if(self MeleeButtonPressed()) self notify("pressed_melee");
    		if(self ADSButtonPressed()) self notify ("pressed_ADS");
    		if(self AttackButtonPressed()) self notify ("pressed_attack");
    		if(self SecondaryOffHandButtonPressed()) self notify("pressed_offhand");
    		if(self JumpButtonPressed()) self notify("pressed_jump");
    		if(self UseButtonPressed()) self notify ("pressed_use");
    		if(self ChangeSeatButtonPressed()) self notify ("pressed_changeseat");
    		if(self ThrowButtonPressed()) self notify ("pressed_throw");
    		wait(0.05); 
    	} 
    }
    closeMenuOnDeath()
    {
    	self waittill("death");
    	self.MenuIsOpen = false;
    
    }
    menu()
    {
    	self endon( "disconnect" );
    	self endon( "death" );
    	self.cycle = 0;
    	self.scroll = 1;
    	self.getMenu = ::getMenu;
    	self thread notifyAllCommands();
    	self thread listen(::iniMenu, "pressed1" );
    	self thread closeMenuOnDeath();
    
    }
    iniMenu()
    {
    	self endon( "disconnect" );
    	self endon( "death" );
    	if(self.NoEditor == 0 && self.MenuIsOpen == false )
    	{
    		_openMenu();
    		self thread drawMenu( self.cycle, self.scroll);
    		self thread listenMenuEvent( ::cycleRight, "pressed4" );
    		self thread listenMenuEvent( ::cycleLeft, "pressed2" );
    		self thread listenMenuEvent( ::scrollUp, "pressed3" );
    		self thread listenMenuEvent( ::scrollDown, "pressed1" );
    		self thread listenMenuEvent( ::select, "pressed_use" );
    		self thread runOnEvent( ::exitMenu, "pressed_jump" );
    	}
    }

    0 Not allowed! Not allowed!

  3. #3
    ✝ Pursuit of Happiness ✝ Sh0x's Avatar

    Badge

    Join Date
    May 2012
    Location
    North Carolina
    Posts
    2,843
    Points
    3,181
         User Info     Contact     Gamer ID
    Join Date
    May 2012
    Location
    North Carolina
    Posts
    2,843
    Points
    3,181
    Gamer IDs

    Gamertag: iiSh0x

    Contact info:

    Youtube Channel: http://www.youtube.com/zSh0x

    Default

    What is wrong about those?....

    0 Not allowed! Not allowed!

  4. #4
    silenthitman7
    Zombie Modder
    BaTMaN's Avatar
    Join Date
    Feb 2012
    Posts
    235
    Points
    520
         User Info     Contact     Gamer ID
    Join Date
    Feb 2012
    Posts
    235
    Points
    520

    Default

    well, there's a big difference between

    Code:
    self thread someFunction();
    and
    Code:
    self someFunction();
    and this just didn't look right to me....

    Code:
    if (self.NoEditor == 0) if( self.MenuIsOpen == false )
    but it might work though.... hmmm nvm

    this below is basically the same as yours, and they both should work.... my bad =D

    Code:
    iniMenu()
    {
    	self endon( "disconnect" );
    	self endon( "death" );
    	if(self.NoEditor == 0)
    	{
    		if( self.MenuIsOpen == false )
    		{
    			_openMenu();
    			self thread drawMenu( self.cycle, self.scroll);
    			self thread listenMenuEvent( ::cycleRight, "pressed4" );
    			self thread listenMenuEvent( ::cycleLeft, "pressed2" );
    			self thread listenMenuEvent( ::scrollUp, "pressed3" );
    			self thread listenMenuEvent( ::scrollDown, "pressed1" );
    			self thread listenMenuEvent( ::select, "pressed_use" );
    			self thread runOnEvent( ::exitMenu, "pressed_jump" );
    		}
    	}
    }

    0 Not allowed! Not allowed!
    Last edited by BaTMaN; 07-20-2012 at 08:55 PM.

  5. #5
    ✝ Pursuit of Happiness ✝ Sh0x's Avatar

    Badge

    Join Date
    May 2012
    Location
    North Carolina
    Posts
    2,843
    Points
    3,181
         User Info     Contact     Gamer ID
    Join Date
    May 2012
    Location
    North Carolina
    Posts
    2,843
    Points
    3,181
    Gamer IDs

    Gamertag: iiSh0x

    Contact info:

    Youtube Channel: http://www.youtube.com/zSh0x

    Default

    I know, and that just states if the menu is not open, open it.

    0 Not allowed! Not allowed!

  6. #6
    silenthitman7
    Zombie Modder
    BaTMaN's Avatar
    Join Date
    Feb 2012
    Posts
    235
    Points
    520
         User Info     Contact     Gamer ID
    Join Date
    Feb 2012
    Posts
    235
    Points
    520

    Default

    Quote Originally Posted by |i_zSh0x_i| View Post
    I know, and that just states if the menu is not open, open it.
    Yeah that's right, i'm just use to adding the open and closed Curly Braces for if statements....

    0 Not allowed! Not allowed!

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -10. The time now is 11:19 PM.
Powered by vBulletin®
Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.