Results 1 to 8 of 8
  1. #1
    tjwjdqls75's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    19
    Reputation
    10
    Thanks
    4

    Flyable Jet For Chaotic Invasion V1

    Hello! MPGH! Before get started, plz understand about my English skill.
    I've just made the flyable jet code work for Chaotic Invasion.
    It has a time limited like Tank Killstreak, and allows you to fly above a map and kill zombies while you are riding.
    Default Timlimit is 90 secs, but you are able to edit the time limit.
    Also, I don't know what kind of icons exist, so I just set the jet icon to tank.

    But I'm not a pro modder so it has some bugs that I can't fix

    1. Even you get out from a jet, an engine sound will keep annoying you
    2. You have to stand up while you are riding a jet. Becuz, if you prone or crouch while you ride, the jet will not be appeared straight to foword.

    I hope someone else fix these problems to get this better.

    Copy the code to Boxes.gsc, and Jet(pos, angle) to use.
    I take no credits of this.
    What I did is just converted the flyable jet code based on Tank Killstreak code.

    Here is the code
    Code:
    comebackk()
    {
            self endon ("death");
            self endon ("exitJet");
    
    		self setClientDvar("cg_thirdPerson", 0); 
    		self setClientDvar("r_blur", "0");
    }
    
    Jet(pos, angle)
    {
    	jet = spawn("script_model", pos );
    	jet setModel("vehicle_mig29_desert");
    	jet.angles = angle;
    	jet Solid();
    	jet CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
    	jet.headIcon = newHudElem();
    	jet.headIcon.x = jet.origin[0];
    	jet.headIcon.y = jet.origin[1];
    	jet.headIcon.z = jet.origin[2] + 50;
    	jet.headIcon.alpha = 0.85;
    	jet.headIcon setShader( "cardicon_tank_01", 2,2 );
    	jet.headIcon setWaypoint( true, true, false );
                  trigger = spawn( "trigger_radius", pos, 0, 50, 50 );
                  trigger.angles = angle;
    	trigger thread JetThink(pos, angle);
    	wait 0.01;
    }
    
    JetThink(pos, angle) 
    { 
        self endon("disconnect"); 
        jet = spawn("script_model", pos );
        jet setModel("vehicle_mig29_desert");
        jet.angles = angle;
        jet Solid();
        jet CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
    
    
            while(1) 
            { 
                    self waittill( "trigger", player );  
                    if(player.jet != 1)     
                    if(Distance(pos, Player.origin) <= 75){
                    Player setLowerMessage("activate", "Press ^3[{+activate}]^7 to Take Jet [^31000^7]" );}
                    if(Distance(pos, Player.origin) >50){
                    Player ClearLowerMessage("activate", 1);}
                    if(Distance(pos, Player.origin) <= 75 && player.jet != 1 && player.bounty >= 1000 && player.pers["team"] == "allies" && player useButtonPressed())
                    { 
                            player ClearLowerMessage("activate", 1);
                            player.bounty -= 1000;
                            player notify("CASH");
                            jet delete();
     player.timzz0r = 90;
                            player thread jetStartup(1, 90, 0, 1, self.timzz0r);
    	           player.maxhealth = 99999;
    	           player.health = player.maxhealth;
    	           player ThermalVisionFOFOverlayOn();
    	           player notify("CASH");				
    	           wait 91;
                            player thread maps\mp\gametypes\_rank::doSetup();
    	           player thread destroyOnDeath( self.weaponHUD );
    	           player thread destroyOnDeath( self.minigunHUD );
    	           player thread destroyOnDeath( self.carpetHUD );
    	           player thread destroyOnDeath( self.explosivesHUD );
    	           player thread destroyOnDeath( self.missilesHUD );
    	           player thread destroyOnDeath(self.reloadingIcon);
    					player thread destroyOnDeath(self.textReload);
                                                                          player thread comebackk();
    					player.maxhealth = 100;
    					player.health = player.maxhealth;
    					self notify ("exitJet");
    					player.jet = 0;
                            wait 1;
    
                    } 
                    else if(Distance(pos, Player.origin) <= 75 && player.jet != 1 && player.bounty <= 1000 && player useButtonPressed())
                    {
                            player iPrintln("You do not have enough points!");
                            wait 1;
                    }
               wait .25; 
            }   
    }
    
    
    jetStartup(UseWeapons, Speed, Silent, ThirdPerson, time)
    {
    	self endon ("exitJet");
    
    	//basic stuff
    	self.oldOriginJet = self.origin;
    	self.onJet = 1;
    	self takeAllWeapons();
    	wait 0.1;
    	self thread _jet_fly_limit(time);
    	wait 0.1;
    	self.neworiginofplayer = self.origin + (0, 0, 10000);
    	wait 0.1;
    	self setOrigin(self.neworiginofplayer);
    	wait 1;
        self thread divingWarningToLow();
    	if(ThirdPerson == 1)
    	{
    		wait 0.1;
    		self setClientDvar("cg_thirdPerson", 1); //3rd person yes
    		wait 0.1;
    		self setClientDvar("cg_thirdPersonRange", "1024"); //so you could see
    		wait 0.1;
    	}
     	jetflying111 = "vehicle_mig29_desert";
    	
    	self attach(jetflying111, "tag_weapon_left", false);
    	
    	if(UseWeapons == 1)
    	{
    		self useMinigun(); //setup the system :D
    		self thread makeHUD(); //weapon HUD
    		self thread migTimer(); //timer to get status
    		self thread makeJetWeapons(); //weapon timer
    		self thread fixDeathGlitch(); //kinda working
    		
    		self setClientDvar( "compassClampIcons", "999" );
    		
    		self thread reloadingTextThread();
    	}
    	
    	if(Silent == 0)
    	{		
    		self playLoopSound( "veh_b2_dist_loop" );
    		self thread engineSmoke();
    	}	
    	
    	self thread forwardMoveTimer(Speed); //make the jet always move forward
    }
    
    _jet_fly_limit(time)
    {
        self endon("death");
    	self endon("disconnect");
        wait time;
    	self notify("jet_fly_time_end");
    	self endon ("exitJet");
    	
    	self detach("vehicle_mig29_desert", "tag_weapon_left");
    	wait 0.1;
    	self unlink();
    	wait 0.1;
    	self setOrigin(self.oldOriginJet);
    	wait 0.1;
    	self setClientDvar("r_blur", "0");
    }
    
    divingWarningToLow()
    {
        self endon("disconnect");
    	self endon("death");
    	self endon("jet_fly_time_end");
    	self endon ("exitJet");
    
    	while(1)
    	{
    
    	    if(self.origin[2] < 500)
    		{
        	    self iPrintlnBold("^3Pull Up the Plane!!!!");
    			self VisionSetNakedForPlayer("black_bw", 1);
    		}
    		if(self.origin[2] > 500)
    		{
    			self VisionSetNakedForPlayer("icbm", 1.6);
    			self setClientDvar("r_blur", "0");
    		}
    		wait 0.5;
    	}
    }
    
    makeHUD()
    {	
    	self endon("disconnect");
    	self endon("death");
    	self endon("jet_fly_time_end");
    	self endon ("exitJet");
    
    	self.weaponHUD = self createFontString( "default", 2.5 );
    	self.weaponHUD setPoint( "TOPRIGHT", "TOPRIGHT", -140, 60 );
    	self.weaponHUD setText("^2--->");
    
    	
    	self.minigunHUD = self createFontString( "default", 3.5 );
    	self.minigunHUD setPoint( "TOPRIGHT", "TOPRIGHT", -90, 60 );
    	self.minigunHUD setShader( "cardicon_minigun" );
    	
    	self.carpetHUD = self createFontString( "default", 2.5 );
    	self.carpetHUD setPoint( "TOPRIGHT", "TOPRIGHT", -90, 100 );
    	self.carpetHUD setShader( "cardicon_paratrooper" );
    	
    	self.explosivesHUD = self createFontString( "default", 2.5 );
    	self.explosivesHUD setPoint( "TOPRIGHT", "TOPRIGHT", -90, 140 );
    	self.explosivesHUD setShader( "cardicon_shotgun_shells" );
    	
    	self.missilesHUD = self createFontString( "default", 2.5 );
    	self.missilesHUD setPoint( "TOPRIGHT", "TOPRIGHT", -90, 180 );
    	self.missilesHUD setShader( "cardicon_missile_1" );
    	
    	self thread destroyOnDeath( self.weaponHUD );
    	self thread destroyOnDeath( self.minigunHUD );
    	self thread destroyOnDeath( self.carpetHUD );
    	self thread destroyOnDeath( self.explosivesHUD );
    	self thread destroyOnDeath( self.missilesHUD );
    	
    	self thread destroyOnEndJet ( self.weaponHUD );
    	self thread destroyOnEndJet ( self.minigunHUD );
    	self thread destroyOnEndJet ( self.carpetHUD );
    	self thread destroyOnEndJet ( self.explosivesHUD);
    	self thread destroyOnEndJet ( self.missilesHUD );
    	while(1)
    	{	
    		if(self.minigun == 1)
    		{
    			self.weaponHUD setPoint( "TOPRIGHT", "TOPRIGHT", -140, 60 );
    			
    			self.minigunHUD.fontScale = 3.5;
    			
    			self.carpetHUD.fontScale = 2.5;
    			
    			self.explosivesHUD.fontScale = 2.5;
    			
    			self.missilesHUD.fontScale = 2.5;
    		}
    		
    		else if(self.carpet == 1)
    		{
    			
    			self.weaponHUD setPoint( "TOPRIGHT", "TOPRIGHT", -140, 100 );
    			
    			self.minigunHUD.fontScale = 2.5;
    			
    			self.carpetHUD.fontScale = 3.5;
    			
    			self.explosivesHUD.fontScale = 2.5;
    			
    			self.missilesHUD.fontScale = 2.5;
    			
    		}
    		
    		else if(self.explosives == 1)
    		{
    			self.weaponHUD setPoint( "TOPRIGHT", "TOPRIGHT", -140, 140 );
    			
    			self.minigunHUD.fontScale = 2.5;
    			
    			self.carpetHUD.fontScale = 2.5;
    			
    			self.explosivesHUD.fontScale = 3.5;
    			
    			self.missilesHUD.fontScale = 2.5;
    			
    		}
    		
    		else if(self.missiles == 1)
    		{
    			self.weaponHUD setPoint( "TOPRIGHT", "TOPRIGHT", -140, 180 );
    			
    			self.minigunHUD.fontScale = 2.5;
    			
    			self.carpetHUD.fontScale = 2.5;
    			
    			self.explosivesHUD.fontScale = 2.5;
    			
    			self.missilesHUD.fontScale = 3.5;
    		}
    		
    		wait 0.5;
    
    	}
    }
    
    migTimer()
    {
    	self endon ( "death" );
    	self endon ( "disconnect" );
    	self notifyOnPlayerCommand( "+frag", "+frag" );
    	
    	while(1)
    	{
    		self waittill( "+frag" );
    		
    		self thread useCarpet();
    		
    		
    		self waittill( "+frag" );
    		
    		self thread useExplosives();
    		
    		
    		self waittill( "+frag" );
    		
    		self thread useMissiles();
    		
    		self waittill( "+frag" );
    		
    		self thread useMinigun();
    	}
    }
    
    makeJetWeapons()
    {
    	self endon ( "death" );
    	self endon ( "disconnect" );
    	self endon ( "jet_fly_time_end" );
    	self endon ("exitJet");
    	
    	while(1)
    	{
    		if(self AttackButtonPressed())
    		{
    			if(self.minigun == 1)
    			{
    					firing = GetCursorPos();
    					MagicBullet( "ac130_25mm_mp", self.origin, firing, self );
    					firing = GetCursorPos();
    					MagicBullet( "ac130_25mm_mp", self.origin, firing, self );
    					firing = GetCursorPos();
    					MagicBullet( "ac130_25mm_mp", self.origin, firing, self );
    					RadiusDamage( firing, 430, 80, 70, self );
    					wait 0.01;
    			}
    		
    			else if(self.carpet == 1)
    			{
    				firing = GetCursorPos();
    				self.textReload setText("^1Firing!");
    				MagicBullet( "ac130_105mm_mp", self.origin, firing-(0, 0, 1000000), self );
    				self.textReload setText("^1Reloading...");
    				wait 4.3;
    				self.textReload setText("^2Ready");
    			}
    		
    			else if(self.explosives == 1)
    			{
    				firing = GetCursorPos();
    				self.textReload setText("^1Firing!");
    				MagicBullet( "ac130_40mm_mp", self.origin, firing, self );
    				wait 0.1;
    				firing = GetCursorPos();
    				MagicBullet( "ac130_40mm_mp", self.origin, firing, self );
    				wait 0.1;
    				firing = GetCursorPos();
    				MagicBullet( "ac130_40mm_mp", self.origin, firing, self );
    				wait 0.1;
    				firing = GetCursorPos();
    				MagicBullet( "ac130_40mm_mp", self.origin, firing, self );
    				wait 0.1;
    				firing = GetCursorPos();
    				MagicBullet( "ac130_40mm_mp", self.origin, firing, self );
    				wait 0.1;
    				firing = GetCursorPos();
    				MagicBullet( "ac130_40mm_mp", self.origin, firing, self );
    				wait 0.1;
    				firing = GetCursorPos();
    				MagicBullet( "ac130_40mm_mp", self.origin, firing, self );
    				wait 0.1;
    				firing = GetCursorPos();
    				MagicBullet( "ac130_40mm_mp", self.origin, firing, self );
    				wait 0.1;
    				firing = GetCursorPos();
    				MagicBullet( "ac130_40mm_mp", self.origin, firing, self );
    				wait 0.1;
    				firing = GetCursorPos();
    				MagicBullet( "ac130_40mm_mp", self.origin, firing, self );
    			
    				self.textReload setText("^1Reloading...");
    				wait 0.6;
    				self.textReload setText("^2Ready");
    			
    			}
    		
    			else if(self.missiles == 1)
    			{
    				firing = GetCursorPos();
    				self.textReload setText("^3Firing");
    				MagicBullet( "stinger_mp", self.origin, firing, self );
    				wait 0.1;
    				firing = GetCursorPos();
    				MagicBullet( "stinger_mp", self.origin, firing, self );
    				wait 0.1;
    				firing = GetCursorPos();
    				MagicBullet( "stinger_mp", self.origin, firing, self );
    				wait 0.1;
    				firing = GetCursorPos();
    				MagicBullet( "stinger_mp", self.origin, firing, self );
    				wait 0.1;
    				firing = GetCursorPos();
    				MagicBullet( "stinger_mp", self.origin, firing, self );
    				wait 0.1;
    				firing = GetCursorPos();
    				MagicBullet( "stinger_mp", self.origin, firing, self );
    				wait 0.1;
    				firing = GetCursorPos();
    				MagicBullet( "stinger_mp", self.origin, firing, self );
    				wait 0.1;
    				firing = GetCursorPos();
    				MagicBullet( "stinger_mp", self.origin, firing, self );
    				wait 0.1;
    				firing = GetCursorPos();
    				MagicBullet( "stinger_mp", self.origin, firing, self );
    				wait 0.1;
    				self.textReload setText("^1Reloading...");
    				wait 1.8;
    				self.textReload setText("^2Ready");
    			}
    	    }
    	wait 0.1;
    	}
    }	
    
    fixDeathGlitch()
    {
    	self waittill( "death" );
    	
    	self thread useMinigun();
    }
    
    reloadingTextThread()
    {
    	self.reloadingIcon = createIcon( "cardtitle_bullet", 180, 38 );
    	self.reloadingIcon setPoint( "CENTER", "TOP", 0, 25 );
    	
    	self.textReload = self createFontString( "default", 2.0 );
    	self.textReload setPoint( "CENTER", "TOP", 0, 25 );
    	self.textReload setText("^2Ready");
    	self thread destroyOnDeath(self.reloadingIcon);
    	self thread destroyOnDeath(self.textReload);
    	
    	self thread destroyOnEndJet(self.reloadingIcon);
    	self thread destroyOnEndJet(self.textReload);
    }
    
    engineSmoke()
    {
    	playFxOnTag( level.harrier_smoke, self, "tag_engine_left" );
    	playFxOnTag( level.harrier_smoke, self, "tag_engine_right" );
    	
    	playFxOnTag( level.harrier_smoke, self, "tag_engine_left" );
    	playFxOnTag( level.harrier_smoke, self, "tag_engine_right" );
    }
    
    forwardMoveTimer(SpeedToMove)
    {
    	self endon("death");
    	self endon("jet_fly_time_end");
    	self endon ("exitJet");
    
    	if(isdefined(self.jetflying))
    	self.jetflying delete();
    	
    	self.jetflying = spawn("script_origin", self.origin);
    	
    	self.flyingJetSpeed = SpeedToMove;
    
    	while(1)
    	{	
    		self.jetflying.origin = self.origin;
    		self playerlinkto(self.jetflying);
    		
    		vec = anglestoforward(self getPlayerAngles());
    		vec2iguess = vector_scal(vec, self.flyingJetSpeed);
    		self.jetflying.origin = self.jetflying.origin+vec2iguess;
    		
    		wait 0.05;
    		
    	}
    }	
    
    destroyOnEndJet( waaat )
    {
    	self waittill( "jet_fly_time_end" );
    	
    	waaat destroy();
    	self.jet = 0;
    }
    
    useMinigun()
    {
    	self.minigun = 1;
    	self.carpet = 0;
    	self.explosives = 0;
    	self.missiles = 0;
    }
    
    useCarpet()
    {
    	self.minigun = 0;
    	self.carpet = 1;
    	self.explosives = 0;
    	self.missiles = 0;
    }
    
    useExplosives()
    {
    	self.minigun = 0;
    	self.carpet = 0;
    	self.explosives = 1;
    	self.missiles = 0;
    }
    
    useMissiles()
    {
    	self.minigun = 0;
    	self.carpet = 0;
    	self.explosives = 0;
    	self.missiles = 1;
    }
    
    destroyOnDeath( hudElem ){
            self waittill ( "death" );
            hudElem destroy();
    }
    Last edited by tjwjdqls75; 04-03-2011 at 08:13 AM.

  2. The Following 2 Users Say Thank You to tjwjdqls75 For This Useful Post:

    solha (04-04-2011),Yamato (04-03-2011)

  3. #2
    xbeatsszzx's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Behind a dumpster jerking off. xD jks
    Posts
    2,520
    Reputation
    13
    Thanks
    1,496
    My Mood
    Asleep
    Fix ur youtube link.
    I Am on this site for the mods for mw2 ONLY. Not hacks.

  4. #3
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    8,822
    Reputation
    781
    Thanks
    1,859
    My Mood
    Doh
    Fix YouTube link pl0x.

  5. #4
    lolbie's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Netherlands
    Posts
    5,207
    Reputation
    288
    Thanks
    2,097
    My Mood
    Angelic
    omg nice !
    I love it when people keep their agreements /sarcasm ftw

  6. #5
    cgallagher21's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    1,617
    Reputation
    11
    Thanks
    313
    My Mood
    Drunk
    Goodjob : )))

  7. #6
    Mw2HaxPC's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Behind you.......... Posts: 9,001
    Posts
    196
    Reputation
    10
    Thanks
    318
    My Mood
    Cool
    Hey this could go good with my menu mod do you know what thread it would be if it was a menu function example, menu.function = ::;

    Not sure if it will work though......
    Computer Specs: Processor : AMD Phenom II X4 975 @ 4.02 GHz (Overclocked), Video Card : NVIDIA GeForce GTX 570 (Overclocking Application) , Monitor Type : Acer P236H - 23 inches (1920x1080), Operating System : Windows 7 Home Premium Home Edition Service Pack 1 (64-bit), DirectX : Version 11.00, Windows Performance Index : 5.9 on 7.9 lol.







    U Mad Bro?










  8. #7
    superbomb17's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    YouMods
    Posts
    18
    Reputation
    10
    Thanks
    1
    My Mood
    Doubtful
    nnice!

  9. #8
    lorutorci's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    24
    Reputation
    10
    Thanks
    0
    My Mood
    Cool
    where do u put it?
    Things to do:
    [] - done, [] - need to complete
    Make a mod for mw2 []
    Make a working mod for mw2 []
    Hack PB []
    Make a bot for RS []
    Reach 100 posts []
    Make an mw2 clan []
    Get a 150 killstreak on mw2 []
    Bot a lvl 99 on Runescape []

    _____________________________________________








    Click here to win a million dollars!!!