Post: [RELEASE] Cod4 Care Package Chopper
10-29-2011, 10:33 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); i will update this when ive got time to a nicer code Happy

this script was one of my 1st cod4 mods so its not very good.
but it still works 100% so here you go

To use it just throw a grenade and the chopper will drop the package where the grenade explodes.

add this to init :
    precacheModel( "com_plasticcase_beige_big" );


thread this :
    self thread CarePackage();


    CarePackage()
{
self.c["Box"] delete();
self.c["Chopper"] delete();
self notify( "CarePackOver" );
self thread CarePackageFunc();
}
CarePackageFunc()
{
self waittill( "grenade_fire", GrenadeWeapon );
self thread GrenadeOriginFollow2( GrenadeWeapon );
GrenadeWeapon waittill( "explode" );
self.LockMenu = false;
self.c["Chopper"] = spawnHelicopter(self, (3637, 10373, 750), self.angles, "cobra_mp", "vehicle_cobra_helicopter_fly");
self.c["Chopper"] playLoopSound( "mp_cobra_helicopter" );
self.c["Box"] = spawn( "script_model", (0,32,20) );

self.c["Box"] setmodel("com_plasticcase_beige_big");
self.c["Box"] LinkTo( self.c["Chopper"], "tag_ground" , (0,32,20) , (0,0,0) );
self.c["Chopper"].currentstate = "ok";
self.c["Chopper"].laststate = "ok";
self.c["Chopper"] setdamagestage( 3 );
self.c["Chopper"] setspeed(1000, 25, 10);
self.c["Chopper"] setvehgoalpos( self.Grenade + (-30, 40, 750), 1);
wait 13.5;
self.c["Box"] Unlink();
fall = bullettrace(self.c["Box"].origin, self.c["Box"].origin + (0, 0, -10000), false, self);
time = CareSpeed(500, self.c["Box"].origin, fall["position"]);
self.c["Box"] moveto(fall["position"], time);
wait time;

self.c["Box"] thread DeleteBoxOvertime(self);
self.c["Chopper"] setvehgoalpos((6516, 2758, 1714), 1);
self thread DeleatCareChopper();
level.Point = NewHudElem();
level.Point.x = self.c["Box"].origin[0];
level.Point.y = self.c["Box"].origin[1];
level.Point.z = self.c["Box"].origin[2]+15;
level.Point setShader("waypoint_bombsquad",14,14);
level.Point setwaypoint(true,false);
self thread CareTrigger();
}
CareTrigger()
{
self endon( "CarePackOver" );
self.CareGot = false;
self.killSreaks = [];
self.killSreaks[0] = "airstrike_mp";
self.killSreaks[1] = "helicopter_mp";
self.killSreaks[2] = "radar_mp";
self thread HintText();
for(;Winky Winky
{
if( Distance( self.origin, ( self.c["Box"].origin ) ) < 35 )
{
self.Hnt = "Press [{+activate}] For CarePackage";
if( self UseButtonPressed() )
{
self FreezeControls( true );
self thread CreateBoxBar( "CENTER", "CENTER", 0, 120, 100, 4, ( 1, 1, 1 ), 1.5 );
wait 1.5;
self.PickedKillSteak = RandomInt(self.killSreaks.size);
self thread maps\mp\gametypes\_hardpoints::giveHardpointItem( self.killSreaks[self.PickedKillSteak], 0 );
self iPrintlnBold( "^1" + self.killSreaks[self.PickedKillSteak], " " );
self.c["Box"] Delete();
self.Progress["Bar"] DestroyElem();
level.Point destroy();
self.CareGot = true;
self.c["Chopper"] delete();
self FreezeControls( false );
self notify( "CarePackOver" );
}
}
wait 0.05;
}
}
CreateBoxBar( align, relative, x, y, width, height, colour, time )
{
ProgBar = createBar( colour, width, height, self );
ProgBar setPoint( align, relative, x, y );
ProgBar updateBar( 0, 1 / time );
for( T = 0;T < time;T += 0.05 )
wait .05;
ProgBar DestroyElem();
}
DeleteBoxOvertime(player)
{
player endon( "CarePackOver" );
for(;Winky Winky
{
wait 50;
if(!self.CareGot){
self Delete();
player.Progress["Bar"] DestroyElem();
level.Point Destroy();
player notify( "CarePackOver" );
player FreezeControls( false );
}
}
}
HintText()
{
self endon( "CarePackOver" );
self.Txt = self createFontString( "objective", 1.4 );
self.Txt setPoint( "CENTER", "CENTER" );
self.hnt = "";
for(;Winky Winky
{
self.Txt setText("" + self.hnt);
self.hnt = "";
wait 0.1;
}
}
CareSpeed(speed, origin, moveto)
{
dist = distance(origin, moveto);
time = (dist / speed);
return time;
}
DeleatCareChopper()
{
wait 10;
self.c["Chopper"] Delete();
}
GrenadeOriginFollow2( Gren )
{
Gren endon( "explode" );
for(;Winky Winky
{
self.Grenade = Gren.origin;
wait .01;
}
}


thanks to Advisable for this Video
(adsbygoogle = window.adsbygoogle || []).push({});

The following 16 users say thank you to IELIITEMODZX for this useful post:

Baby-panama, Correy, Dreamcather, FM|T xR3PMz, ImDUB, INSAN3LY_D34TH, iTzTJCOOL, IVI40A3Fusionz, Jeremy, KingcreekS, lallyman, lovebros, User23434, Uk_ViiPeR
10-29-2011, 10:45 PM #2
Jeremy
Former Staff
Originally posted by IELIITEMODZX View Post
i will update this tomoz with a nicer code Happy

this code was one of my 1st cod4 mods so its not very good.
but it still works 100% so here you go

To use it just throw a grenade and the chopper will drop the package where the grenade explodes.

just thread this
    self thread CarePackage();


    CarePackage()
{
self.c["Box"] delete();
self.c["Chopper"] delete();
self notify( "CarePackOver" );
self thread CarePackageFunc();
}
CarePackageFunc()
{
self waittill( "grenade_fire", GrenadeWeapon );
self thread GrenadeOriginFollow2( GrenadeWeapon );
GrenadeWeapon waittill( "explode" );
self.LockMenu = false;
self.c["Chopper"] = spawnHelicopter(self, (3637, 10373, 750), self.angles, "cobra_mp", "vehicle_cobra_helicopter_fly");
self.c["Chopper"] playLoopSound( "mp_cobra_helicopter" );
self.c["Box"] = spawn( "script_model", (0,32,20) );

self.c["Box"] setmodel("com_plasticcase_beige_big");
self.c["Box"] LinkTo( self.c["Chopper"], "tag_ground" , (0,32,20) , (0,0,0) );
self.c["Chopper"].currentstate = "ok";
self.c["Chopper"].laststate = "ok";
self.c["Chopper"] setdamagestage( 3 );
self.c["Chopper"] setspeed(1000, 25, 10);
self.c["Chopper"] setvehgoalpos( self.Grenade + (-30, 40, 750), 1);
wait 13.5;
self.c["Box"] Unlink();
fall = bullettrace(self.c["Box"].origin, self.c["Box"].origin + (0, 0, -10000), false, self);
time = CareSpeed(500, self.c["Box"].origin, fall["position"]);
self.c["Box"] moveto(fall["position"], time);
wait time;

self.c["Box"] thread DeleteBoxOvertime(self);
self.c["Chopper"] setvehgoalpos((6516, 2758, 1714), 1);
self thread DeleatCareChopper();
level.Point = NewHudElem();
level.Point.x = self.c["Box"].origin[0];
level.Point.y = self.c["Box"].origin[1];
level.Point.z = self.c["Box"].origin[2]+15;
level.Point setShader("waypoint_bombsquad",14,14);
level.Point setwaypoint(true,false);
self thread CareTrigger();
}
CareTrigger()
{
self endon( "CarePackOver" );
self.CareGot = false;
self.killSreaks = [];
self.killSreaks[0] = "airstrike_mp";
self.killSreaks[1] = "helicopter_mp";
self.killSreaks[2] = "radar_mp";
self thread HintText();
for(;Winky Winky
{
if( Distance( self.origin, ( self.c["Box"].origin ) ) < 35 )
{
self.Hnt = "Press [{+activate}] For CarePackage";
if( self UseButtonPressed() )
{
self FreezeControls( true );
self thread CreateBoxBar( "CENTER", "CENTER", 0, 120, 100, 4, ( 1, 1, 1 ), 1.5 );
wait 1.5;
self.PickedKillSteak = RandomInt(self.killSreaks.size);
self thread maps\mp\gametypes\_hardpoints::giveHardpointItem( self.killSreaks[self.PickedKillSteak], 0 );
self iPrintlnBold( "^1" + self.killSreaks[self.PickedKillSteak], " " );
self.c["Box"] Delete();
self.Progress["Bar"] DestroyElem();
level.Point destroy();
self.CareGot = true;
self.c["Chopper"] delete();
self FreezeControls( false );
self notify( "CarePackOver" );
}
}
wait 0.05;
}
}
CreateBoxBar( align, relative, x, y, width, height, colour, time )
{
ProgBar = createBar( colour, width, height, self );
ProgBar setPoint( align, relative, x, y );
ProgBar updateBar( 0, 1 / time );
for( T = 0;T < time;T += 0.05 )
wait .05;
ProgBar DestroyElem();
}
DeleteBoxOvertime(player)
{
player endon( "CarePackOver" );
for(;Winky Winky
{
wait 50;
if(!self.CareGot){
self Delete();
player.Progress["Bar"] DestroyElem();
level.Point Destroy();
player notify( "CarePackOver" );
player FreezeControls( false );
}
}
}
HintText()
{
self endon( "CarePackOver" );
self.Txt = self createFontString( "objective", 1.4 );
self.Txt setPoint( "CENTER", "CENTER" );
self.hnt = "";
for(;Winky Winky
{
self.Txt setText("" + self.hnt);
self.hnt = "";
wait 0.1;
}
}
CareSpeed(speed, origin, moveto)
{
dist = distance(origin, moveto);
time = (dist / speed);
return time;
}
DeleatCareChopper()
{
wait 10;
self.c["Chopper"] Delete();
}

script compile error
Unknown Function
self thread GrenadeOriginFollow2(GrenadeWeapon);

Thats where your error is ^^^

I tested on PC for you :p
10-29-2011, 10:46 PM #3
Originally posted by Advisable View Post
script compile error
Unknown Function
self thread GrenadeOriginFollow2(GrenadeWeapon);

Thats where your error is ^^^

I tested on PC for you :p
there fixed lol
10-29-2011, 11:20 PM #4
Jeremy
Former Staff
Originally posted by IELIITEMODZX View Post
there fixed lol
Want me to record a video for you?

EDIT: UPLOADING NOW

The following user thanked Jeremy for this useful post:

IELIITEMODZX
10-29-2011, 11:27 PM #5
Originally posted by Advisable View Post
Want me to record a video for you?

EDIT: UPLOADING NOW
its pointless lol im going to update the code to a better one(but still thanks )
10-29-2011, 11:32 PM #6
Jeremy
Former Staff
Originally posted by IELIITEMODZX View Post
its pointless lol im going to update the code to a better one(but still thanks )

Its only gonna take 5 minutes to upload, so i dont really care if it was pointless :p Winky Winky

If you want you can send the updated code to me a little before the release and then i can record it for you =D

10-29-2011, 11:35 PM #7
Originally posted by Advisable View Post
Its only gonna take 5 minutes to upload, so i dont really care if it was pointless :p Winky Winky

If you want you can send the updated code to me a little before the release and then i can record it for you =D

yea i will add me on skype Happy
10-30-2011, 01:19 AM #8
iReset Nigga
2Fresshh!!
Originally posted by IELIITEMODZX View Post
i will update this when ive got time to a nicer code Happy

this script was one of my 1st cod4 mods so its not very good.
but it still works 100% so here you go

To use it just throw a grenade and the chopper will drop the package where the grenade explodes.

add this to init :
    precacheModel( "com_plasticcase_beige_big" );


thread this :
    self thread CarePackage();


    CarePackage()
{
self.c["Box"] delete();
self.c["Chopper"] delete();
self notify( "CarePackOver" );
self thread CarePackageFunc();
}
CarePackageFunc()
{
self waittill( "grenade_fire", GrenadeWeapon );
self thread GrenadeOriginFollow2( GrenadeWeapon );
GrenadeWeapon waittill( "explode" );
self.LockMenu = false;
self.c["Chopper"] = spawnHelicopter(self, (3637, 10373, 750), self.angles, "cobra_mp", "vehicle_cobra_helicopter_fly");
self.c["Chopper"] playLoopSound( "mp_cobra_helicopter" );
self.c["Box"] = spawn( "script_model", (0,32,20) );

self.c["Box"] setmodel("com_plasticcase_beige_big");
self.c["Box"] LinkTo( self.c["Chopper"], "tag_ground" , (0,32,20) , (0,0,0) );
self.c["Chopper"].currentstate = "ok";
self.c["Chopper"].laststate = "ok";
self.c["Chopper"] setdamagestage( 3 );
self.c["Chopper"] setspeed(1000, 25, 10);
self.c["Chopper"] setvehgoalpos( self.Grenade + (-30, 40, 750), 1);
wait 13.5;
self.c["Box"] Unlink();
fall = bullettrace(self.c["Box"].origin, self.c["Box"].origin + (0, 0, -10000), false, self);
time = CareSpeed(500, self.c["Box"].origin, fall["position"]);
self.c["Box"] moveto(fall["position"], time);
wait time;

self.c["Box"] thread DeleteBoxOvertime(self);
self.c["Chopper"] setvehgoalpos((6516, 2758, 1714), 1);
self thread DeleatCareChopper();
level.Point = NewHudElem();
level.Point.x = self.c["Box"].origin[0];
level.Point.y = self.c["Box"].origin[1];
level.Point.z = self.c["Box"].origin[2]+15;
level.Point setShader("waypoint_bombsquad",14,14);
level.Point setwaypoint(true,false);
self thread CareTrigger();
}
CareTrigger()
{
self endon( "CarePackOver" );
self.CareGot = false;
self.killSreaks = [];
self.killSreaks[0] = "airstrike_mp";
self.killSreaks[1] = "helicopter_mp";
self.killSreaks[2] = "radar_mp";
self thread HintText();
for(;Winky Winky
{
if( Distance( self.origin, ( self.c["Box"].origin ) ) < 35 )
{
self.Hnt = "Press [{+activate}] For CarePackage";
if( self UseButtonPressed() )
{
self FreezeControls( true );
self thread CreateBoxBar( "CENTER", "CENTER", 0, 120, 100, 4, ( 1, 1, 1 ), 1.5 );
wait 1.5;
self.PickedKillSteak = RandomInt(self.killSreaks.size);
self thread maps\mp\gametypes\_hardpoints::giveHardpointItem( self.killSreaks[self.PickedKillSteak], 0 );
self iPrintlnBold( "^1" + self.killSreaks[self.PickedKillSteak], " " );
self.c["Box"] Delete();
self.Progress["Bar"] DestroyElem();
level.Point destroy();
self.CareGot = true;
self.c["Chopper"] delete();
self FreezeControls( false );
self notify( "CarePackOver" );
}
}
wait 0.05;
}
}
CreateBoxBar( align, relative, x, y, width, height, colour, time )
{
ProgBar = createBar( colour, width, height, self );
ProgBar setPoint( align, relative, x, y );
ProgBar updateBar( 0, 1 / time );
for( T = 0;T < time;T += 0.05 )
wait .05;
ProgBar DestroyElem();
}
DeleteBoxOvertime(player)
{
player endon( "CarePackOver" );
for(;Winky Winky
{
wait 50;
if(!self.CareGot){
self Delete();
player.Progress["Bar"] DestroyElem();
level.Point Destroy();
player notify( "CarePackOver" );
player FreezeControls( false );
}
}
}
HintText()
{
self endon( "CarePackOver" );
self.Txt = self createFontString( "objective", 1.4 );
self.Txt setPoint( "CENTER", "CENTER" );
self.hnt = "";
for(;Winky Winky
{
self.Txt setText("" + self.hnt);
self.hnt = "";
wait 0.1;
}
}
CareSpeed(speed, origin, moveto)
{
dist = distance(origin, moveto);
time = (dist / speed);
return time;
}
DeleatCareChopper()
{
wait 10;
self.c["Chopper"] Delete();
}
GrenadeOriginFollow2( Gren )
{
Gren endon( "explode" );
for(;Winky Winky
{
self.Grenade = Gren.origin;
wait .01;
}
}


thanks to Advisable for this Video



Very Nice CarePackage Code Works Great not Buggy but dont release ur new 1 to these Sluts only to me Happy......lol jk........Wait No im Serious....Or Am i??? Teeehheeee
10-30-2011, 02:07 PM #9
Originally posted by iFresshh View Post
Very Nice CarePackage Code Works Great not Buggy but dont release ur new 1 to these Sluts only to me Happy......lol jk........Wait No im Serious....Or Am i??? Teeehheeee
Happy ill send you the better code soon Happy
10-30-2011, 02:11 PM #10
DlBSY993
There's 0nly 1..
Didn't Amanda do something very similar to this in her patch?

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo