Post: [SCRIPT] Gersh Device | Converted From MW2
05-16-2012, 11:16 PM #1
TOM DAINTY
Do a barrel roll!
(adsbygoogle = window.adsbygoogle || []).push({});
Basically, the mod gives you a grenade. You throw a c4, and where it hits, everyone in the game (except for the person who threw it) gets sucked into the gersh device, and then killed.

Video on MW2:


Note - Precache this; level.fx_airstrike_afterburner = loadfx("fire/jet_afterburner");
    
gersh()
{
self.oldWeapon = self getCurrentWeapon();
self giveWeapon("Frag_grenade_mp");
self SetWeaponAmmoClip( "frag_grenade_mp", 1 );
self switchToWeapon("Frag_grenade_mp");
self waittill("grenade_fire", grenade, weaponName);
if(weaponName == "Frag_grenade_mp")
{
grenade hide();
self.gersh=spawn("script_model", grenade.origin);
self.gersh setModel("weapon_c4_mp");
self.gersh linkTo( grenade );
grenade waittill("death");
self.glow = spawnfx(level.fx_airstrike_afterburner, self.gersh.origin);
TriggerFX(self.glow);
end=self.gersh.origin;
for(p = 0;p < level.players.size;p++){players = level.players[p];players thread gershPull(end,self);}
self switchToWeapon(self.oldWeapon);
}
}
gershPull(loc,initiator)
{
self endon("survive");
self iPrintln("^6Gersch Device Activated!");
self playloopsound( "veh_mig29_mid_loop" );
for(i=0;i<600;i++)
{
rand=(randomint(50),randomint(50),randomint(50));
radius=distance(self.origin,loc);
if(radius > 150)
{
if(level.teambased)
{
if(self.pers["team"] != initiator.pers["team"])
{
angles = VectorToAngles( loc - self.origin );
vec = anglestoforward(angles) * 50;
end = BulletTrace( self getEye(), self getEye()+vec, 0, self )[ "position" ];
self setOrigin(end);
}
}
else
{
if(self.name != initiator.name)
{
angles = VectorToAngles( loc - self.origin );
vec = anglestoforward(angles) * 50;
end = BulletTrace( self getEye(), self getEye()+vec, 0, self )[ "position" ];
self setOrigin(end);
}
}
}
else RadiusDamage( loc, 150, 100, 50, initiator );
wait 0.01;
}
self iPrintln("^2You Survived!");
self.gersh delete();
self.glow delete();
self notify("survive");
}


Credits:
NBK-DEVASTATION - Original creator
Last edited by TOM DAINTY ; 05-18-2012 at 11:28 AM.

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

COD5-MAN-,

The following 3 users groaned at TOM DAINTY for this awful post:

247Yamato, KingcreekS, User2340034u
05-18-2012, 04:11 PM #29
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by IELIITEMODZX View Post
You can get a warning for doing that, i think it says it in the rules.


Pffft rules are made to be broken.
05-18-2012, 08:16 PM #30
Complete Speed
Do a barrel roll!
i can't get this to work...... i've added it to a patch correctly it just switches to a grenade then when i throw it it just blows up like normal.
help? :(
05-18-2012, 09:25 PM #31
TOM DAINTY
Do a barrel roll!
Originally posted by HowUModThat View Post
i can't get this to work...... i've added it to a patch correctly it just switches to a grenade then when i throw it it just blows up like normal.
help? :(

You open your menu pressing Frag don't you /facepalm
05-19-2012, 06:25 AM #32
Complete Speed
Do a barrel roll!
Originally posted by gstarizraw View Post
You open your menu pressing Frag don't you /facepalm


no i added it to x_daftvader_x's legacy patch which opens with the night vision.

---------- Post added at 01:25 AM ---------- Previous post was at 01:11 AM ----------

also here is what i did, here is your script in the same .gsc as the menu
You must login or register to view this content.

here is how it's threaded in the menu
You must login or register to view this content.

the init() in weapons.gsc
You must login or register to view this content.
with what you said to precache

also when i call it it doesn't say any of the iprintln or anything it just goes to a grenade then then i throw grenade no player go into it it just blows up like a normal grenade.
05-19-2012, 06:23 PM #33
forflah123
Who’s Jim Erased?
Originally posted by HowUModThat View Post
i can't get this to work...... i've added it to a patch correctly it just switches to a grenade then when i throw it it just blows up like normal.
help? :(

if you cant get it to work right in your patch then you need to optimize it to work it really not hard to figure out
05-19-2012, 06:47 PM #34
Newelly
Can’t trickshot me!
This is pretty awesome actually but why did NBK not release himself i have seen him become a lot more active around the 'Call of Duty: Modern Warfare' section.
05-20-2012, 05:54 PM #35
TOM DAINTY
Do a barrel roll!
Originally posted by HowUModThat View Post
no i added it to x_daftvader_x's legacy patch which opens with the night vision.

---------- Post added at 01:25 AM ---------- Previous post was at 01:11 AM ----------

also here is what i did, here is your script in the same .gsc as the menu
You must login or register to view this content.

here is how it's threaded in the menu
You must login or register to view this content.

the init() in weapons.gsc
You must login or register to view this content.
with what you said to precache

also when i call it it doesn't say any of the iprintln or anything it just goes to a grenade then then i throw grenade no player go into it it just blows up like a normal grenade.


God knows then, this has came straight from my patch and it works fine for me Happy
05-28-2012, 02:40 PM #36
TOM DAINTY
Do a barrel roll!
Originally posted by forflah123 View Post
if you cant get it to work right in your patch then you need to optimize it to work it really not hard to figure out


Optimizing will not make it work, it just makes the code smaller Happy

The following user groaned TOM DAINTY for this awful post:

IELIITEMODZX
05-29-2012, 12:11 PM #37
forflah123
Who’s Jim Erased?
Originally posted by gstarizraw View Post
Optimizing will not make it work, it just makes the code smaller Happy


well what would you bloody call it then i know optimizing make the code smaller but you also optimize the code to work in your patch if you don't have the same variable for example in the player menu when i want to do something to a player i don't use self.selplay but i use self.PlayerFunctions

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo