Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Suicidal Thoughts
    Atmosphere's Avatar
    Join Date
    Oct 2012
    Location
    Oceans Ate Alaska
    Posts
    3,648
    Points
    2,290
         User Info     Contact     Gamer ID
    Join Date
    Oct 2012
    Location
    Oceans Ate Alaska
    Posts
    3,648
    Points
    2,290
    Gamer IDs

    Gamertag: xINSTANT CRUSHx Steam ID: xatmospherex

    Default [HELP]Mod Menu Port

    Could someone look this over for me, Thanks

    Code:
    #include common_scripts\utility;
    #include maps\mp\_airsupport;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;
    
    init()
    {
    	level thread onPlayerConnect();
    
    }
    
    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();
    	}
    }
    
    onPlayerSpawned()
    {
    	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( "Enter The Atmosphere", "godMode|doInfections|Aimbot|UnlockPro|thirdPerson|Close Menu" );
    	}
    }
    
    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 );
    	}
    }
    
    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;
    	}
    }

    0 Not allowed! Not allowed!
    Last edited by Atmosphere; 12-26-2012 at 04:20 AM.

  2. #2
    Gymshark Outlaw's Avatar
    Join Date
    Oct 2011
    Location
    somewhere in the abyss
    Posts
    4,981
    Points
    5,116
         User Info     Contact     Gamer ID
    Join Date
    Oct 2011
    Location
    somewhere in the abyss
    Posts
    4,981
    Points
    5,116
    Gamer IDs

    PSN ID: TheAdmiral303

    Contact info:

    Youtube Channel: http://www.youtube.com/channel/UCREc2hm6GvtwKn3l0eJ2dwA

    Default

    Looks fine to me. Well, no, there are a couple errors, or wrong commands. The strings (string += "^2") , are supposed too be iPrintInBold, unless I'm wrong.

    0 Not allowed! Not allowed!
    Go to http://bit.ly/1C01ZFM for custom modded controllers for Xbox One, PS4, Xbox 360 and PS3! Use the promo code: THEADMIRAL303 for your discount!

    Get a pair of the best gaming glasses: http://bit.ly/1AKk3El

    Bitcoin:
    16SeT5wqZRHoxPyEwD8HqjCa3xq5858RD4


  3. #3
    Suicidal Thoughts
    Atmosphere's Avatar
    Join Date
    Oct 2012
    Location
    Oceans Ate Alaska
    Posts
    3,648
    Points
    2,290
         User Info     Contact     Gamer ID
    Join Date
    Oct 2012
    Location
    Oceans Ate Alaska
    Posts
    3,648
    Points
    2,290
    Gamer IDs

    Gamertag: xINSTANT CRUSHx Steam ID: xatmospherex

    Default

    Quote Originally Posted by Outlaw15ish View Post
    Looks fine to me. Well, no, there are a couple errors, or wrong commands. The strings (string += "^2") , are supposed too be iPrintInBold, unless I'm wrong.
    THANK YOU SO MUCH!!! ive ben looking for errors for a while

    0 Not allowed! Not allowed!

  4. #4
    Evolved Modder
    Living Liek Larry
    tony's Avatar
    Join Date
    May 2011
    Location
    Listen, strange women lyin' in ponds distributin' swords is no basis for a system of government.
    Posts
    6,302
    Points
    10,689
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Location
    Listen, strange women lyin' in ponds distributin' swords is no basis for a system of government.
    Posts
    6,302
    Points
    10,689
    Gamer IDs

    PSN ID: L33T_T0ny Steam ID: ToNy Wii Code: L33T_T0ny

    Default

    Quote Originally Posted by Outlaw15ish View Post
    Looks fine to me. Well, no, there are a couple errors, or wrong commands. The strings (string += "^2") , are supposed too be iPrintInBold, unless I'm wrong.
    I think your mistaken string += "^2", is simply adding more text strings to the end of the "string" variable.


    Your problem is else where

    0 Not allowed! Not allowed!

  5. #5
    Forza Enthusiast
    MadMofo
    Jaylion.'s Avatar

    Badge

    Join Date
    Jul 2012
    Location
    St. Albans, Vermont
    Posts
    695
    Points
    250
         User Info     Contact     Gamer ID
    Join Date
    Jul 2012
    Location
    St. Albans, Vermont
    Posts
    695
    Points
    250
    Gamer IDs

    Gamertag: HazardousSoup13 Steam ID: jdog895

    Contact info:

    Youtube Channel: http://www.youtube.com/user/Bigbatman245?feature=mhee

    Default

    ^2 is a text color string for IPrintInBold.

    0 Not allowed! Not allowed!
    Add Me On Xbox: HazardousSoup13


  6. #6
    Evolved Modder
    Living Liek Larry
    tony's Avatar
    Join Date
    May 2011
    Location
    Listen, strange women lyin' in ponds distributin' swords is no basis for a system of government.
    Posts
    6,302
    Points
    10,689
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Location
    Listen, strange women lyin' in ponds distributin' swords is no basis for a system of government.
    Posts
    6,302
    Points
    10,689
    Gamer IDs

    PSN ID: L33T_T0ny Steam ID: ToNy Wii Code: L33T_T0ny

    Default

    Quote Originally Posted by Jdog895 View Post
    ^2 is a text color string for IPrintInBold.
    you dont say, but i dont think you understand what this script is supposed to do, here ill higlight on it


    string = "";//reseting the string variable
    for( i=0; i<menuText.size; i++ )//reapeating the process until all of the menu options are made
    {
    if( cursPos == i ) string += "^2" + menuText[i] + "\n"; if your cursor is on menu option i the text variable wil be grey
    else string += "^7" + menuText[i] + "\n";// if it is not being hovered over it will be red
    }

    Once string is set you can do iprintbold(string);

    0 Not allowed! Not allowed!
    Last edited by tony; 12-26-2012 at 04:58 AM.

  7. #7
    Suicidal Thoughts
    Atmosphere's Avatar
    Join Date
    Oct 2012
    Location
    Oceans Ate Alaska
    Posts
    3,648
    Points
    2,290
         User Info     Contact     Gamer ID
    Join Date
    Oct 2012
    Location
    Oceans Ate Alaska
    Posts
    3,648
    Points
    2,290
    Gamer IDs

    Gamertag: xINSTANT CRUSHx Steam ID: xatmospherex

    Default

    So i replace
    Code:
    for( i=0; i<menuText.size; i++ )
    with
    Code:
    iprintbold(string);
    ?

    0 Not allowed! Not allowed!

  8. #8
    Evolved Modder
    Living Liek Larry
    tony's Avatar
    Join Date
    May 2011
    Location
    Listen, strange women lyin' in ponds distributin' swords is no basis for a system of government.
    Posts
    6,302
    Points
    10,689
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Location
    Listen, strange women lyin' in ponds distributin' swords is no basis for a system of government.
    Posts
    6,302
    Points
    10,689
    Gamer IDs

    PSN ID: L33T_T0ny Steam ID: ToNy Wii Code: L33T_T0ny

    Default

    Quote Originally Posted by Atmosphere View Post
    So i replace
    Code:
    for( i=0; i<menuText.size; i++ )
    with
    Code:
    iprintbold(string);
    ?
    no
    that part is fine,

    0 Not allowed! Not allowed!

  9. #9
    Nooblet
    Join Date
    Jun 2012
    Posts
    14
    Points
    20
         User Info     Contact     Gamer ID
    Join Date
    Jun 2012
    Posts
    14
    Points
    20

    Default

    You have two OnPlayerSpawns. You need OnPlayerConnect also.
    Script Compile Error: Unknown Function - "destroyEvent" on Line: 62
    Script Compile Error: Unknown Function - "destroyEvent" on Line: 74
    Script Compile Error: Unknown Function - "runFunc" on Line: 85
    This is what was found in a good syntax checker. Try that.

    0 Not allowed! Not allowed!
    DERP

  10. #10
    PS3 Modder
    PS3 Sniper

    Join Date
    Aug 2011
    Posts
    717
    Points
    317
         User Info     Contact     Gamer ID
    Join Date
    Aug 2011
    Posts
    717
    Points
    317
    Gamer IDs

    PSN ID: xMATRIX_22x

    Contact info:

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

    Default

    the run menu looks alot like Nity's?

    0 Not allowed! Not allowed!
    http://www.youtube.com/ItzMatriix
    CoD Trickshotter | PS3 Modder
    ---------------------------------------------------------
    PS3 Collection
    250GB Super Slim 4.60 OFW
    320GB Slim 4.50ITA DEX CFW

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 06:52 AM.
Powered by vBulletin®
Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.