mirror of
https://github.com/Resxt/Plutonium-IW5-Scripts.git
synced 2025-04-18 20:22:53 +00:00
Create disable_damages
This commit is contained in:
parent
e44219ea35
commit
1ee779097a
@ -6,16 +6,17 @@ Simple drag and drop scripts
|
||||
|
||||
Change the team names to custom names depending on the game mode
|
||||
|
||||
## disable_damages.gsc
|
||||
|
||||
Disable melee knifing damage.
|
||||
Also prevents players from dying to their own grenades and rockets.
|
||||
Note that if you shoot enough rockets (around 20/30) you can still kill yourself.
|
||||
This also doesn't prevent players from killing themselves when they hold a frag grenade in their hands.
|
||||
|
||||
## disable_nuke_killstreak.gsc
|
||||
|
||||
Prevent players from obtaining the nuke/M.O.A.B killstreak when they have enough kills.
|
||||
|
||||
## disable_self_explosive_damage.gsc
|
||||
|
||||
Prevents players from dying to their own grenades and rockets.
|
||||
Note that if you shoot enough rockets (around 20/30) you can still kill yourself.
|
||||
This also doesn't prevent players from killing themselves when they hold a frag grenade in their hands.
|
||||
|
||||
## display_player_stats.gsc
|
||||
|
||||
Display the player's killstreak, total kills and deaths on top of the screen
|
||||
|
@ -1,10 +1,10 @@
|
||||
Init()
|
||||
{
|
||||
level.callbackplayerdamagestub = level.callbackplayerdamage;
|
||||
level.callbackplayerdamage = ::DisableSelfExplosiveDamage;
|
||||
level.callbackplayerdamage = ::DisableDamages;
|
||||
}
|
||||
|
||||
DisableSelfExplosiveDamage( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, timeOffset )
|
||||
DisableDamages( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, timeOffset )
|
||||
{
|
||||
if (isDefined(eAttacker))
|
||||
{
|
||||
@ -12,6 +12,7 @@ DisableSelfExplosiveDamage( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDea
|
||||
{
|
||||
if (eAttacker.guid == self.guid)
|
||||
{
|
||||
// Disable explosive damage on self
|
||||
switch (sMeansOfDeath)
|
||||
{
|
||||
case "MOD_PROJECTILE_SPLASH": iDamage = 0;
|
||||
@ -22,6 +23,14 @@ DisableSelfExplosiveDamage( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDea
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Disable melee knifing damage
|
||||
if (sMeansOfDeath == "MOD_MELEE")
|
||||
{
|
||||
iDamage = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user