TActivePlayer.OnDamage
Revision as of 11:05, 30 July 2013 by Mighty (talk | contribs) (Created page with " '''''property OnDamage''''' Access mode: RW Event handler type: TOnDamageEvent Event handler declaration: function (Shooter, Victim: TActivePlayer; Damage: Integer;...")
property OnDamage Access mode: RW Event handler type: TOnDamageEvent Event handler declaration: function (Shooter, Victim: TActivePlayer; Damage: Integer; WeaponType: Byte): Integer
Description
Event property called when a player is hurt, whether from a killing poly, bullet or command.
Example
Example ignores all damage dealt, players become invincible.
function OnDamageZero(Shooter, Victim: TActivePlayer; Damage: Integer; WeaponType: Byte): Integer
begin
Result := 0;
end;
var
i: Byte;
begin
for i:=1 to 32 do
Players[i].OnDamage := @OnDamageZero;
end.