Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Mystery Box Mod

  1. #1
    Jungler Strike's Avatar
    Join Date
    Apr 2011
    Location
    Gotham
    Posts
    6,312
    Points
    9,407
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Location
    Gotham
    Posts
    6,312
    Points
    9,407
    Gamer IDs

    PSN ID: xSTR11K3Rx Steam ID: xSTRiiK3Rx

    Contact info:

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

    Default Mystery Box Mod

    i Worked my but off doing this and im not fully done them all but here we go. i added the mystery box to all the maps but some as i didnt have time using tlpwnzers original mystery box for it

    add this to init
    Code:
                   thread spawnMysteryBox();
    Add this to on player connected
    Code:
    		player thread checkDistance();
    place this anyware in the gsc
    Code:
    spawnMysteryBox()
    {
    	switch( getDvar( "mapname" ) )
    	{
    		case "mp_nuked":
    			level thread createBox( ( -231, 1009, -46 ), ( 0, 112, 0 ) );
    			break;
    		case "mp_mountain": //Summit
    			level thread createBox( ( 2460.06, -202.451, 332.886), ( 0, 359.84, 0 ) );
    			break;
    		case "mp_array": // This is the map Array
    			level thread createBox( ( -252.082, 832.601 550.669), ( 0, 162.609, 0 ) );
    			break;
    		case "mp_cairo": // Havana
    			level thread createBox( ( 1635.01, -204.111, 16.6277),( 0, 268.708, 0 ) );
    			break;
    		case "mp_cosmodrome": //Launch
    			level thread createBox( ( 9, 386, 9 ), ( 0, 2, 0 ) );
    			break;
    		case "mp_crisis": //Crisis
    			level thread createBox( ( 230.327, 1688.15, 88.8792 ), ( 0, 182.331, 0 ) );
    			break;
    		case "mp_duga": //Grid
    			level thread createBox( ( 2041.07, -3426.86, 149.861), ( 0, 89.5001, 0 ) );
    			break;
    		case "mp_firingrange": //Firing Range
    			level thread createBox( ( 9, 1494, -38 ), ( 0, -105, 0 ) );
    			break;
    		case "mp_hanoi": //Hanoi
    			level thread createBox( ( 1416.41, -2921.29, -44.1077 ), ( 0, 91.6699, 0 ) );
    			break;
    		case "mp_havoc": //Jungle
    			level thread createBox( ( 160.264, -968.97, 317.918 ), ( 0, 329.89, 0 ) );
    			break;
    		case "mp_radiation": //Radiation
    			break;
    		case "mp_russianbase": //WMD
    			break;
    		case "mp_villa": //Villa
    			break;
    	}
    }
    
    createBox( pos, ang )
    {
    	level.mBox = spawn( "script_model", pos );
    	level.mBox setModel( "mp_supplydrop_ally" );
    	level.mBox.angles = ang;
    
    	objective_add( 0, "active", level.mBox.origin );
    	
    objective_icon( 0, "compass_supply_drop_green" );
    
    	iconOrg = level.mBox.origin;
    	icon = newTeamHudElem( "allies" );
    
    	icon.x = iconOrg[0];
    
    	icon.y = iconOrg[1];
    
    	icon.z = iconOrg[2] + 30;
    
    	icon.alpha = .59;
    
    	icon.archived = true;
    
    	icon setShader( "compass_supply_drop_green", 15, 15 );
    	icon setwaypoint( false );
    
    	 
    	level.mGun = spawn( "script_model", level.mBox.origin );
            level.mGun setModel( GetWeaponModel( "claymore_mp" ) );
            level.mGun.angles = level.mBox.angles + ( 0, 90, 0 );
            level.mGun hide();
    }
    
    checkDistance()
    {
    	self endon( "disconnect" );
    	
    	while( 1 )
    	{
    		wait 0.01;
    
    		if( distance( self.origin, level.mBox.origin ) < 75 && self._infected == false && self.pers["team"] == "allies" && level.using == 0 )
    		{
    			self setLowerMessage( "Press [{+activate}] for Mystery Box - Cost 950" );
    			randWeap = randomInt( level.guns.size );
    			
    			for(;;)
    			{
    				if( self useButtonPressed() == true && distance( self.origin, level.mBox.origin ) < 75 && self._infected == false && self.pers["team"] == "allies" && level.using == 0 && self.money >= 950 )
    				{
    					self thread addMoney( -950 );
    					level.using = 1;
    					self clearLowerMessage( 1.0 );
    					level.mGun show();
                            	        level.mGun moveTo( level.mBox.origin + ( 0, 0, 30 ), 1 );
                            	        wait .2;
                            	        for( i = 0; i < 14; i++ )
                            	        {
                            	        	rander = randomInt( level.guns.size );
                            	                level.mGun setModel( GetWeaponModel( level.guns[rander] ) );
                            	                wait( 0.025 * i );
                            	        }
                            	        level.mGun setModel( GetWeaponModel( level.guns[randWeap] ) );
                            	        wait .1;
    					if( self GetWeaponsListPrimaries().size > 1 ) self takeWeapon( self getCurrentWeapon() );
                            	        self giveWeapon( level.guns[randWeap] );
                            	        self switchToWeapon( level.guns[randWeap] );
                            	        self giveMaxAmmo( level.guns[randWeap] );
                            	        self clearLowerMessage( .5 );
                            	        level.mGun moveTo( level.mBox.origin, 1 );
                                    	wait 1;
                                    	level.mGun hide();
                                    	level.using = 0;
                                    	break;
    				}
    				else if( distance( self.origin, level.mBox.origin ) > 75 )
                                    {
                                            self clearLowerMessage( 1.0 );
                                            break;
                                    }
    				wait 0.01;
    			}
    		}
    		else
    		{
    			self clearLowerMessage( 1.0 );
    		}
    	}
    	wait 0.01;
    }

    add this to global dvars
    Code:
    	level.guns[0] = "aug_mp";
            level.guns[1] = "m16_mp";
            level.guns[2] = "spas_mp";
            level.guns[3] = "famas_mp";
            level.guns[4] = "rpk_mp";
            level.guns[5] = "rpg_mp";
            level.guns[6] = "m72_law_mp";
            level.guns[7] = "commando_mp";
            level.guns[8] = "python_mp";
            level.guns[9] = "ak74u_mp";
            level.guns[10] = "l96a1_mp";
            level.guns[11] = "fnfal_mp";
            level.guns[12] = "cz75_mp";
            level.guns[13] = "spectre_mp";
            level.guns[14] = "hk21_mp";
            level.guns[15] = "crossbow_explosive_mp";
            level.guns[16] = "knife_ballistic_mp";
            level.guns[17] = "m60_mp";
            level.guns[18] = "stoner63_mp";

    0 Not allowed! Not allowed!
    Last edited by Strike; 07-28-2011 at 02:49 PM.

    ^Ty goober^
    Quote Originally Posted by xX_BiGFooTT_Xx View Post
    compensate my cock faggot

  2. #2
    Wii Coder
    ChumLee's Avatar

    Badge

    Join Date
    Apr 2011
    Location
    'Murica
    Posts
    5,383
    Points
    7,606
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Location
    'Murica
    Posts
    5,383
    Points
    7,606
    Gamer IDs

    Gamertag: TERR0Rx9

    Contact info:

    Youtube Channel: http://www.youtube.com/user/HAXZingTERR0R

    Default

    Good job man it looks awesome.

    0 Not allowed! Not allowed!


  3. #3
    Member Elial2's Avatar
    Join Date
    Apr 2011
    Posts
    375
    Points
    818
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Posts
    375
    Points
    818

    Default

    awsome job

    0 Not allowed! Not allowed!

  4. #4
    Member
    Join Date
    Jun 2011
    Posts
    189
    Points
    360
         User Info     Contact     Gamer ID
    Join Date
    Jun 2011
    Posts
    189
    Points
    360

    Default

    nice but im having problems with it!!!it gave me bad syntax error

    0 Not allowed! Not allowed!

  5. #5
    Jungler Strike's Avatar
    Join Date
    Apr 2011
    Location
    Gotham
    Posts
    6,312
    Points
    9,407
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Location
    Gotham
    Posts
    6,312
    Points
    9,407
    Gamer IDs

    PSN ID: xSTR11K3Rx Steam ID: xSTRiiK3Rx

    Contact info:

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

    Default

    Idk how it works or anthing i just worked out the co ordinates. If you just replace a existing version of the one with co ord and works then help me out here

    0 Not allowed! Not allowed!

    ^Ty goober^
    Quote Originally Posted by xX_BiGFooTT_Xx View Post
    compensate my cock faggot

  6. #6
    Member
    Join Date
    Apr 2011
    Posts
    173
    Points
    272
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Posts
    173
    Points
    272

    Default

    Looks cool I will have to try it but where dies it go?

    0 Not allowed! Not allowed!

  7. #7
    Jungler Strike's Avatar
    Join Date
    Apr 2011
    Location
    Gotham
    Posts
    6,312
    Points
    9,407
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Location
    Gotham
    Posts
    6,312
    Points
    9,407
    Gamer IDs

    PSN ID: xSTR11K3Rx Steam ID: xSTRiiK3Rx

    Contact info:

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

    Default

    add thread spawnMysteryBox(); to the init.

    then paste the spawn mysterybox anyware in the same gsc then add the second part to global dvars

    read op i added the right stuff to it

    0 Not allowed! Not allowed!

    ^Ty goober^
    Quote Originally Posted by xX_BiGFooTT_Xx View Post
    compensate my cock faggot

  8. #8
    Member
    Join Date
    Apr 2011
    Posts
    173
    Points
    272
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Posts
    173
    Points
    272

    Default

    Ok thanks for the help. Sorry to be off topic but do u know how to make a custom player spawn?

    0 Not allowed! Not allowed!

  9. #9
    Jungler Strike's Avatar
    Join Date
    Apr 2011
    Location
    Gotham
    Posts
    6,312
    Points
    9,407
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Location
    Gotham
    Posts
    6,312
    Points
    9,407
    Gamer IDs

    PSN ID: xSTR11K3Rx Steam ID: xSTRiiK3Rx

    Contact info:

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

    Default

    ok i have added everything needed and will work now

    0 Not allowed! Not allowed!

    ^Ty goober^
    Quote Originally Posted by xX_BiGFooTT_Xx View Post
    compensate my cock faggot

  10. #10
    Wii Coder
    ChumLee's Avatar

    Badge

    Join Date
    Apr 2011
    Location
    'Murica
    Posts
    5,383
    Points
    7,606
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Location
    'Murica
    Posts
    5,383
    Points
    7,606
    Gamer IDs

    Gamertag: TERR0Rx9

    Contact info:

    Youtube Channel: http://www.youtube.com/user/HAXZingTERR0R

    Default

    Ok I just started modding but so yeah. I put this in the zombies.gsc but there is not enough space in it. Is there another way to do this or how do you use it?

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