Release Friendly Fire remover
#1
Brick 
As requested here is a plugin to remove friendly-fire. Hitmarkers still exist but you can't kill a teammate.

[code=csharp]
using System;
using System.Collections.Generic;
using System.Text;
using Addon;

namespace ffoff
{
public class noff : CPlugin
{
public override int OnPlayerDamaged(ServerClient Attacker, ServerClient Victim, string Weapon, int Damage)
{
if ((Attacker.Team == Victim.Team) && (Attacker.ClientNum != Victim.ClientNum))
{
if (GetDvar("g_gametype") != "dm")
{
Damage = 0;
iPrintLnBold("DON'T ATTACK TEAMMATES", Attacker);
return base.OnPlayerDamaged(Attacker, Victim, Weapon, Damage);
}
else
{
return base.OnPlayerDamaged(Attacker, Victim, Weapon, Damage);
}
}
else
{
return base.OnPlayerDamaged(Attacker, Victim, Weapon, Damage);
}
}
}
}
[/code]


Attached Files
.rar   ffoff.rar (Size: 1.81 KB / Downloads: 258)
LOL
Reply

#2
Fixed some bugs and updated source code. Nades and probably ks will still kill teammates since explosions work awakard in this game.
LOL
Reply

#3
Would it be possible to add damage to the attacker (like reflective friendly fire)?

Thanks,

TiLLeR
Reply

#4
(06-15-2012, 17:16)TiLLeR Wrote: Would it be possible to add damage to the attacker (like reflective friendly fire)?

Thanks,

TiLLeR

No, that's not possible.
[Image: azuw.jpg]
Reply

#5
Huge thanks to estebest!! He took the time to enter my server and worked with me to get the plugin just right.
[Image: b_350_20_FFAD41_E98100_000000_591F11.png]
Reply

#6
(06-15-2012, 17:16)TiLLeR Wrote: Would it be possible to add damage to the attacker (like reflective friendly fire)?

Thanks,

TiLLeR

It would be possible but not very good and buggy
LOL
Reply

#7
(06-15-2012, 19:47)estebespt Wrote:
(06-15-2012, 17:16)TiLLeR Wrote: Would it be possible to add damage to the attacker (like reflective friendly fire)?

Thanks,

TiLLeR

It would be possible but not very good and buggy

Even if it was buggy it would be something that I'd be willing to try. No worries if it's not worth the effort through. Appreciate the quick responses Smile
Reply

#8
Good job!

Portuguese:

Muito bom trabalho!

Thanks Barata...
Don't worry if things aren't the way you planned, in the end everything will solve itself...
Reply

#9
(06-15-2012, 23:29)barata Wrote: Good job!

Portuguese:

Muito bom trabalho!

Thanks Barata...

Obrigado @barata :p tudo legal? xD
LOL
Reply

#10
If this really works, then YOU are the man. Going to test it now.
[Image: b_560_95_1.png]
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help Help Function Fire dargula 1 3,162 10-31-2013, 23:03
Last Post: Nekochan
  rapid fire tubwux 0 2,431 09-02-2013, 00:55
Last Post: tubwux
Tongue Weapon Remover For Players downy 3 4,438 09-11-2012, 20:32
Last Post: JariZ
  [Request] Disable Friendly Fire and Enable Kill Cam on hardcore mode. Dumas 15 14,200 09-10-2012, 14:45
Last Post: OzonE
  [Request] rapid key sender like rapid fire raminr63 8 7,502 08-29-2012, 01:29
Last Post: Devilmaster666
  [Release] MW3 Background Smoke Remover kokole 12 13,931 07-24-2012, 21:16
Last Post: JariZ
  SecondaryWeaponAkimbo works but cant fire JoSchaap 12 11,340 07-06-2012, 16:59
Last Post: [Z00MBY] Alex
  enable killcam and disable friendly fire in harcore mamalialex 1 3,170 06-19-2012, 20:24
Last Post: Kasperle
  [Request] No friendly fire NO KILLCAM on HC mode witherillae 8 6,660 06-15-2012, 15:37
Last Post: estebespt
  Rapid fire? Rocu 2 3,944 05-31-2012, 19:49
Last Post: Tomsen1410

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.