playergoboom() // Modified script _explosive_barrels.gsc{ self iPrintlnBold("You have a grenade stuck on you!"); // Comment this line out if you dont want the message. wait(3); // add a 3 second wait to make it seem there realy is a nade attached. self playsound (level.playerExpSound); // play nade FX playfx (level.nade_fx["nade"]["explode"], self.origin); // play nade sound phyExpMagnitude = 2; // Modify these values if you have changed your nade properties. minDamage = 75; // keep the min damage the same as a real nade. maxDamage = 300; // keep the max damage the same as a real nade. blastRadius = 256; // keep the radius the same as a real nade. // do not pass damage owner if they have disconnected before the nade explodes if ( !isdefined( self.damageOwner ) ) { radiusDamage(self.origin + (0,0,30), blastRadius, maxDamage, minDamage); } else { radiusDamage(self.origin + (0,0,30), blastRadius, maxDamage, minDamage, self.damageOwner); } physicsExplosionSphere( self.origin + (0,0,30), blastRadius, blastRadius/2, phyExpMagnitude ); self maps\mp\gametypes\_shellshock::grenade_earthQuake(); // do a nade earthquake}
precacheShader( "faction_128_sas" );
level.nade_fx["nade"]["explode"] = loadfx ("explosions/grenadeexp_default"); level.playerExpSound = "grenade_explode_default";
self.hasSpawned = false; self.waitingToSpawn = false; self.deathCount = 0;
self.damageOwner = undefined; self.newsweapon = undefined;
prof_end( "Callback_PlayerDamage flags/tweaks" );
if( !isDefined( eInflictor )) // To be honest im not sure if this is safe on X4, but we can always re-work it :P sWeapon = "frag_grenade_mp";
if ( (isSubStr( sMeansOfDeath, "MOD_GRENADE" ) || isSubStr( sMeansOfDeath, "MOD_EXPLOSIVE" ) || isSubStr( sMeansOfDeath, "MOD_PROJECTILE" )) && isDefined( eInflictor ) )
isFrag = isSubStr( sWeapon, "frag_" ); //Lets make sure this is a frag nade if (isFrag && sMeansOfDeath == "MOD_IMPACT") { self.damageOwner = eAttacker; self.newsweapon = "frag_grenade_mp"; // Sets the weapon so it display's as a nade kill Iprintln(eAttacker.name + " has stuck " + self.name); eInflictor.origin = eInflictor.origin + (0, 0, -100000); // Throw the original nade away so it wont cause a 2nd explostion self thread playergoboom(); }
// send out an obituary message to all clients about the kill
if(isdefined(self.newsweapon)) { sWeapon = self.newsweapon; self.newsweapon = undefined; }
//level.onForfeit = ::default_onForfeit;
self initPersStat( "longhead" ); self.longhead = self getPersStat( "longhead" ); self initPersStat( "longshot" ); self.longshot = self getPersStat( "longshot" );
Code: [Select]//level.onForfeit = ::default_onForfeit;I saw thisQuoteCode: [Select] self initPersStat( "longhead" ); self.longhead = self getPersStat( "longhead" ); self initPersStat( "longshot" ); self.longshot = self getPersStat( "longshot" ); I don't have that either in my coding, I started to compare, got up to like 900 and had to stop. nothing at that point.
Code: [Select] self initPersStat( "longhead" ); self.longhead = self getPersStat( "longhead" ); self initPersStat( "longshot" ); self.longshot = self getPersStat( "longshot" );