This is just a short script to allow more flexible configuration of friendly fire. I'm not sure it will work correctly, and since I don't have 2.6 server yet, I can only say it compiles.
//simple friendly fire configuration
//for server version 2.6.0
//Author: Quantifier
//allows to set custom multiplier for friendly damage
//and also how much damage is
//mirrorred to the attacker.
const
FriendlyFireFactor = 50; //values in %
//100 behaves like standard /friendlyfire 1
//0 behaves like standard /friendlyfire 0
FriendlyFirePunish = 50;
//0 is standard
//100 will mirror damage to shooter
//50-50 splits damage evenly between teammates
function OnPlayerDamage(Victim,Shooter: Byte;Damage: Integer) : integer;
var PunishmentDamage : integer; //damage to shooter
begin
if (Shooter<>Victim) and
(GetPlayerStat(Victim, 'Team') = GetPlayerStat(Shooter, 'Team')) then begin
PunishmentDamage:=round((Damage*FriendlyFirePunish) / 100);
Damage:=round((Damage*FriendlyFireFactor) / 100);
if (PunishmentDamage>=GetPlayerStat(Shooter,'Health'))
and (GetPlayerStat(Shooter,'Health')>0) then begin
if GetPlayerStat(Victim,'Health')>Damage then begin
Command('/say '+IdtoName(Shooter)+' has been punished for TeamHurting.');
end else begin
Command('/say '+IdtoName(Shooter)+' has been punished for TeamKilling.');
end;
end;
DoDamage(Shooter, PunishmentDamage);
end;
Result:=Damage;
end;
Probably it will require friendlyfire enabled on server (depends where it makes checks when ff is disabled)
Also, server.ini has TKWarnings_Before_TempBan, what about second variable: TKWarnings_Before_Kill?