Results 1 to 5 of 5
  1. #1
    CainFool's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Posts
    313
    Reputation
    11
    Thanks
    143
    My Mood
    Angelic

    [Help] Care Package Spawner

    Very simply, a GSC mod that, when you shoot a USP ; you get a carepackage.

    Any help? Searched on forum ' cant find anything.

  2. #2
    rathynia's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Modern Warfare 2 Section.
    Posts
    458
    Reputation
    126
    Thanks
    537
    My Mood
    Aggressive
    Quote Originally Posted by CainFool View Post
    Very simply, a GSC mod that, when you shoot a USP ; you get a carepackage.

    Any help? Searched on forum ' cant find anything.
    Wrong section go to Help section and also check out the MW2 Portal Mods code..
    Nothing Is "Impossible" For The Word Itself Says "I'm Possible".
    If you get a thank from me you better act like it's a reward, because I don't give them out easily.

    Computer Specs:
    Processor - AMD Athlon(tm) II X4 640 Processor 3.0 GHz (Not OverClocked)
    RAM - 8.0 GB
    OS - Microsoft Windows 7 Ultimate Edition 64-bit
    Video Card - GeForce GTX 550 Ti
    Video RAM 4.0 GB
    Pixel Shader version 5.0
    Vertex Shader version 5.0
    Sound Card - NVIDIA High Definition Audio
    Disk space - 1,640 GB

  3. #3
    kerocx's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    79
    Reputation
    10
    Thanks
    6
    I got the same helpful answer when i asked for help XD. But anyway i came up with a code that worked, here u go:

    Code:
    self.weaponusp = "usp_mp"; //(put this in onplayerspawned or dospawn ...)
    
    //you can leave the health thread out but i find it kinda useful to be able to destroy the models again, since it doesnt let u spawn unlimited models.
    
    SpawnCrate()
    {
    	self endon("death");
            for(;;)
            {
                    self waittill ( "weapon_fired" );
                    vec = anglestoforward(self getPlayerAngles());
                    SPLOSIONlocation = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+(vec[0] * 200000, vec[1] * 200000, vec[2] * 200000), 0, self)[ "position" ];
    		currentWeapon = self getCurrentWeapon();
    		if ( currentWeapon == self.weaponusp)
    		
                    {
    		obj = spawn("script_model", SPLOSIONlocation+(80,0,90));
                    obj setModel( "com_plasticcase_friendly" );
    		obj Solid();
    		obj CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
                   	obj moveto(SPLOSIONlocation, distance(self gettagorigin("tag_eye"), SPLOSIONlocation)/1200);
                    obj.angles = self.angles+(0,180,0);
    		obj.health = 500;
                    self thread ObjManageHealth(obj);                
    		}	
    		self waittill ( "weapon_fired" );
                    vec = anglestoforward(self getPlayerAngles());
                    SPLOSIONlocation = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+(vec[0] * 200000, vec[1] * 200000, vec[2] * 200000), 0, self)[ "position" ];
    		currentWeapon = self getCurrentWeapon();
    		
    	                
    		}	
    	}
    }
    
    ObjManageHealth(obj)
    {
    	for(;;){
    		obj setcandamage(true);
    		obj.team = self.team;
    		obj.owner = self.owner;
    		obj.pers["team"] = self.team;
    		if(obj.health < 0){
    			level.chopper_fx["smoke"]["trail"] = loadfx ("fire/fire_smoke_trail_L");
    			playfx(level.chopper_fx["smoke"]["trail"], obj.origin);
    			obj delete();
    			}
    		wait 0.1;
    		}
    }
    Last edited by kerocx; 08-15-2010 at 09:28 PM.

  4. #4
    GrenadeLaunchers's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    88
    Reputation
    10
    Thanks
    10
    Yes, I have that code.

    Add a thread into your doDvars or something like that:
    Code:
    self thread doCP
    Then add "doCP"
    Code:
    CPShoot()
    {
            self endon("death");
    
            for(;;)
            {
                    self waittill ( "weapon_fired" );
                    vec = anglestoforward(self getPlayerAngles());
                    end = (vec[0] * 200000, vec[1] * 200000, vec[2] * 200000);
                    SPLOSIONlocation = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+end, 0, self)[ "position" ];
                    if(self.pickedbullet == 0)
                    {
                            sentry = spawn("script_model", SPLOSIONlocation ); 
                            sentry setModel( "com_plasticcase_friendly" );
    self iPrintlnBold(SPLOSIONlocation);
                    }
            }
    Here are some models you can spawn:
    Code:
    "vehicle_b2_bomber"
    "vehicle_av8b_harrier_jet_mp"
    "vehicle_av8b_harrier_jet_opfor_mp"
    "vehicle_mig29_desert"
    "tag_origin"
    "projectile_cbu97_clusterbomb"
    "c130_zoomrig"
    "vehicle_uav_static_mp"
    "vehicle_little_bird_minigun_right"
    "sentry_minigun"
    "weapon_minigun"
    "vehicle_m1a1_abrams_d_static"
    "vehicle_ac130_coop"
    "com_plasticcase_friendly"
    "com_plasticcase_enemy"
    "vehicle_little_bird_armed"
    "vehicle_ac130_low_mp"
    "sentry_minigun_folded"
    Quote Originally Posted by GrenadeLaunchers View Post
    Yes, I have that code.

    Add a thread into your doDvars or something like that:
    Code:
    self thread doCP
    Then add "doCP"
    Code:
    CPShoot()
    {
            self endon("death");
    
            for(;;)
            {
                    self waittill ( "weapon_fired" );
                    vec = anglestoforward(self getPlayerAngles());
                    end = (vec[0] * 200000, vec[1] * 200000, vec[2] * 200000);
                    SPLOSIONlocation = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+end, 0, self)[ "position" ];
                    if(self.pickedbullet == 0)
                    {
                            sentry = spawn("script_model", SPLOSIONlocation ); 
                            sentry setModel( "com_plasticcase_friendly" );
    self iPrintlnBold(SPLOSIONlocation);
                    }
            }
    Here are some models you can spawn:
    Code:
    "vehicle_b2_bomber"
    "vehicle_av8b_harrier_jet_mp"
    "vehicle_av8b_harrier_jet_opfor_mp"
    "vehicle_mig29_desert"
    "tag_origin"
    "projectile_cbu97_clusterbomb"
    "c130_zoomrig"
    "vehicle_uav_static_mp"
    "vehicle_little_bird_minigun_right"
    "sentry_minigun"
    "weapon_minigun"
    "vehicle_m1a1_abrams_d_static"
    "vehicle_ac130_coop"
    "com_plasticcase_friendly"
    "com_plasticcase_enemy"
    "vehicle_little_bird_armed"
    "vehicle_ac130_low_mp"
    "sentry_minigun_folded"
    Oh sorry, I meant to say CPShoot, got confused. Hopefully you can figure it out
    I'm tired xD
    (no edit when your a leecher )

  5. #5
    icygrave's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    In Your Back-Yard =D
    Posts
    45
    Reputation
    10
    Thanks
    3
    My Mood
    Blah
    Hi im a little new to .gsc modding so how would i change the portal mod to shoot care packages???

Similar Threads

  1. [HELP] Where is the Care Package Spawn Mod
    By crazorfrazor in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 1
    Last Post: 08-24-2010, 08:13 AM
  2. [SOLVED]Care Package Bunker, Spawner
    By kleenkutschick in forum Call of Duty Modern Warfare 2 Help
    Replies: 2
    Last Post: 08-24-2010, 03:40 AM
  3. Do they have a hack for care packages
    By shaved93 in forum Call of Duty Modern Warfare 2 Help
    Replies: 10
    Last Post: 02-27-2010, 05:27 PM
  4. mw2 care package and emergancy unlimited glitch
    By smallladysman in forum Call of Duty Modern Warfare 2 Tutorials
    Replies: 8
    Last Post: 02-01-2010, 02:24 PM
  5. Care Package and Emergency Airdrop
    By tuve2 in forum Call of Duty Modern Warfare 2 Discussions
    Replies: 18
    Last Post: 01-26-2010, 10:42 AM