Post: [SCRIPT] - CoD4 Javelin
07-19-2012, 01:28 PM #1
TOM DAINTY
Do a barrel roll!
(adsbygoogle = window.adsbygoogle || []).push({});
Simple and easy code to make and yet so fun, works just like a MW2 Javelin Smile

Precache This in the init() located in the rank.gsc.
PrecacheModel( "projectile_cbu97_clusterbomb" );
    
Jav()
{
self iPrintln( "Javelin [^2Given^7]" );
self GiveWeapon( "rpg_mp", 2 );
wait 1;
self SwitchToWeapon( "rpg_mp" );
for(;Winky Winky
{
if(self AttackButtonPressed() && self getcurrentweapon() == "rpg_mp")
{
pos = getCursorPos();
Jav = spawn( "script_model", self.origin + (10,10,10));
Jav setModel( "projectile_cbu97_clusterbomb" );
Jav.angles = (90,90,90);
Jav playSound("weap_hind_missile_fire");
Jav moveto( self.origin + (10,10,246Cool Man (aka Tustin), 8 );
Jav thread FXME();
wait 8;
Jav moveto( pos, 2 );
wait 2;
playFx(level.chopper_fx["explode"]["large"],Jav.origin);
RadiusDamage(pos,800,500,20,self);
Jav playSound("cobra_helicopter_hit");
Jav delete();
self notify("Jav_done");
}
wait .05;
}
}

getCursorPos()
{
return bulletTrace(self getTagOrigin("tag_weapon_right"),vector_scale(anglesToForward(self getPlayerAngles()),1000000),false,self)["position"];
}

FXME()
{
self endon("Jav_done");
for(;Winky Winky
{
playfx(level.chopper_fx["fire"]["trail"]["medium"],self.origin);
wait .05;
}
}

Credits: IELIITEMODZX - GetCursorPos code
(adsbygoogle = window.adsbygoogle || []).push({});

The following 7 users say thank you to TOM DAINTY for this useful post:

Hot-Fuzz-MoDz, Raul Villaman, Simple-_-Modz, Special-Modding
07-19-2012, 04:37 PM #2
Originally posted by Blazing247 View Post
Simple and easy code to make and yet so fun, works just like a MW2 Javelin Smile

Precache This in the init() located in the rank.gsc.
PrecacheModel( "projectile_cbu97_clusterbomb" );
    
Jav()
{
self iPrintln( "Javelin [^2Given^7]" );
self GiveWeapon( "rpg_mp", 2 );
wait 1;
self SwitchToWeapon( "rpg_mp" );
for(;Winky Winky
{
if(self AttackButtonPressed() && self getcurrentweapon() == "rpg_mp")
{
pos = getCursorPos();
Jav = spawn( "script_model", self.origin + (10,10,10));
Jav setModel( "projectile_cbu97_clusterbomb" );
Jav.angles = (90,90,90);
Jav playSound("weap_hind_missile_fire");
Jav moveto( self.origin + (10,10,246Cool Man (aka Tustin), 8 );
Jav thread FXME();
wait 8;
Jav moveto( pos, 2 );
wait 2;
playFx(level.chopper_fx["explode"]["large"],Jav.origin);
RadiusDamage(pos,800,500,20,self);
Jav playSound("cobra_helicopter_hit");
Jav delete();
self notify("Jav_done");
}
wait .05;
}
}

getCursorPos()
{
return bulletTrace(self getTagOrigin("tag_weapon_right"),vector_scale(anglesToForward(self getPlayerAngles()),1000000),false,self)["position"];
}

FXME()
{
self endon("Jav_done");
for(;Winky Winky
{
playfx(level.chopper_fx["fire"]["trail"]["medium"],self.origin);
wait .05;
}
}

Credits: IELIITEMODZX - GetCursorPos code


a). It's not really anything like the MW2 Javelin.

b) EliiteModz didn't write the GetCursorPos() function. /facepalm

The following 5 users say thank you to x_DaftVader_x for this useful post:

247Yamato, iiReFuZee, INSAN3LY_D34TH, IVI40A3Fusionz, Script Kiddie
07-19-2012, 04:40 PM #3
TOM DAINTY
Do a barrel roll!
Originally posted by x. View Post

a). It's not really anything like the MW2 Javelin.

b) EliiteModz didn't write the GetCursorPos() function. /facepalm


a). It basically is, why don't you create your own and see if it's any different?

b) I got it out of his patch and he created everything in there himself pretty much..

The following 3 users say thank you to TOM DAINTY for this useful post:

Raul Villaman, Simple-_-Modz, Special-Modding
07-19-2012, 04:43 PM #4
Originally posted by Blazing247 View Post
a). It basically is, why don't you create your own and see if it's any different?

b) well I got it out of his patch and he created everything in there himself pretty much..


a) I already have a Javelin that has bullet trace targeting, chopper detection and indoor building checks. It's not getting released on here though Winky Winky

b) EliiteModz wrote about half of his patch. The rest is other stuff from elsewhere. Not flaming him for it, just saying..

The following 4 users say thank you to x_DaftVader_x for this useful post:

247Yamato, iiReFuZee, Jacob-And-Britt, Script Kiddie
07-19-2012, 04:46 PM #5
TOM DAINTY
Do a barrel roll!
Originally posted by x. View Post
a) I already have a Javelin that has bullet trace targeting, chopper detection and indoor building checks. It's not getting released on here though Winky Winky

b) EliiteModz wrote about half of his patch. The rest is other stuff from elsewhere. Not flaming him for it, just saying..


A) :cry:

B) I thought he re-coded everything in his patch?

The following 2 users say thank you to TOM DAINTY for this useful post:

Simple-_-Modz, Special-Modding
07-19-2012, 04:48 PM #6
Jacob-And-Britt
I’m too L33T
Originally posted by x. View Post
a) I already have a Javelin that has bullet trace targeting, chopper detection and indoor building checks. It's not getting released on here though Winky Winky

b) EliiteModz wrote about half of his patch. The rest is other stuff from elsewhere. Not flaming him for it, just saying..
Nice i was wanting to make a javelin but it seemed like to much codeing about 2 months ago but im getting new computer today so that means im going to be codeing so much more new scripts! Maybe ill try to make a javelin as good as yours but idk if i could!

The following user thanked Jacob-And-Britt for this useful post:

Special-Modding
07-19-2012, 04:59 PM #7
Originally posted by Blazing247 View Post
B) I thought he re-coded everything in his patch?


What like this?

    

Sooo wasted version

direction = maps\mp\gametypes\_hardpoints::getBestPlaneDirection(newLocation);
level thread strafeLoop(self,pathNode[0]);
wait(.4);
level thread strafeLoop(self,pathNode[1]);
level thread strafeLoop(self,pathNode[2]);
wait(.4);
level thread strafeLoop(self,pathNode[3]);
level thread strafeLoop(self,pathNode[4]);

Legacy Version


locationYaw = maps\mp\gametypes\_hardpoints::getBestPlaneDirection( location );
level thread doStrafeRun( self, flightPath1 );
wait( 0.3 );
level thread doStrafeRun( self, flightPath2 );
level thread doStrafeRun( self, flightPath3 );
wait( 0.3 );
level thread doStrafeRun( self, flightPath4 );
level thread doStrafeRun( self, flightPath5 );


:carling:

---------- Post added at 05:59 PM ---------- Previous post was at 05:57 PM ----------

Originally posted by Britt View Post
Nice i was wanting to make a javelin but it seemed like to much codeing about 2 months ago but im getting new computer today so that means im going to be codeing so much more new scripts! Maybe ill try to make a javelin as good as yours but idk if i could!


I didn't say I wrote it, I just said I already had one Winky Winky Someone gave it to me about 3 weeks ago :wub:

The following user groaned x_DaftVader_x for this awful post:

Taylor
07-19-2012, 05:03 PM #8
Jacob-And-Britt
I’m too L33T
Originally posted by x. View Post
What like this?

    

Sooo wasted version

direction = maps\mp\gametypes\_hardpoints::getBestPlaneDirection(newLocation);
level thread strafeLoop(self,pathNode[0]);
wait(.4);
level thread strafeLoop(self,pathNode[1]);
level thread strafeLoop(self,pathNode[2]);
wait(.4);
level thread strafeLoop(self,pathNode[3]);
level thread strafeLoop(self,pathNode[4]);

Legacy Version


locationYaw = maps\mp\gametypes\_hardpoints::getBestPlaneDirection( location );
level thread doStrafeRun( self, flightPath1 );
wait( 0.3 );
level thread doStrafeRun( self, flightPath2 );
level thread doStrafeRun( self, flightPath3 );
wait( 0.3 );
level thread doStrafeRun( self, flightPath4 );
level thread doStrafeRun( self, flightPath5 );


:carling:

---------- Post added at 05:59 PM ---------- Previous post was at 05:57 PM ----------



I didn't say I wrote it, I just said I already had one Winky Winky Someone gave it to me about 3 weeks ago :wub:
Thats awesome he must be a pretty good coder.... so you just do private patches now?
07-19-2012, 05:11 PM #9
Originally posted by Britt View Post
Thats awesome he must be a pretty good coder.... so you just do private patches now?


I have a new patch that is about 80% done but I don't know if I'll ever finish it. But if I do it will be released for everyone, not just "Elite" members :derp:

The following user thanked x_DaftVader_x for this useful post:

Jacob-And-Britt
07-19-2012, 05:25 PM #10
Originally posted by C5MN
no my friend your wrong IELIITEMODZX coded everything in his patch from scratch.


No, he didn't, stop being a :dumb: fanboy.

And like I said, I wasn't flaming him, he put together one of the better cod4 patches out there. Every patch uses stuff from all over the place. And he did put credits in for most of the stuff he used.



And the getCursorPosition() function is in the game files somewhere, I can't remember where now though..

The following user thanked x_DaftVader_x for this useful post:

247Yamato

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo