This does not the knife check
but if health is <= 40, then it does 3 damage every second
const
BleedHealth = 40;
BleedDamage = 3;
procedure AppOnIdle(Ticks: cardinal);
var
i: byte;
begin
for i := 1 to 32 do
if (GetPlayerStat(i, 'Active') = true) then
if (GetPlayerStat(i, 'Health') <= BleedHealth) then
DoDamage(i, BleedDamage);
end;
slight code change so whomever hurt you last gets the kill if u die due to bleeding
const
BleedHealth = 40;
BleedDamage = 3;
var
BleedKill: array[1..32] of byte;
procedure AppOnIdle(Ticks: cardinal);
var
i: byte;
begin
for i := 1 to 32 do
if (GetPlayerStat(i, 'Active') = true) then
if (GetPlayerStat(i, 'Health') <= BleedHealth) then
DoDamageBy(i, BleedKill[i], BleedDamage);
end;
function OnPlayerDamage(Victim, Shooter: byte; Damage: integer) : integer
begin
BleedKill[Victim] := Shooter;
Result := Damage;
end;
neither of these are tested.
i guess it could be possible to have it so whomever did the most damage to the player gets the kill if they bleed till death; im kind of lazy atm tho
not sure if its possible to check if weapon is knife.. i suppose if u set the damage in weapons.ini to really high, you can check hte Damage, and see if that number is really high; and set the actual damage done to be a certain % of the damage parameter (to make knife to about the same amoutn of damage; would need some testing though)