Difference between revisions of "TActivePlayer.Damage"

From Soldat Community Wiki
Jump to: navigation, search
(Created page with " '''''procedure Damage(Shooter: Byte; Damage: Integer)''''' Shooter: player dealing the damage Damage: amount of damage dealt ==Description== Injures a player. == Example...")
 
(Description)
 
Line 3: Line 3:
 
   Damage: amount of damage dealt
 
   Damage: amount of damage dealt
 
==Description==
 
==Description==
Injures a player.
+
Injures a player.<br>
 +
If damage is high enough to kill the player, he will receive the "Killed by <Shooter>" message.
  
 
== Example ==
 
== Example ==

Latest revision as of 15:59, 1 July 2013

procedure Damage(Shooter: Byte; Damage: Integer)
 Shooter: player dealing the damage
 Damage: amount of damage dealt

Description

Injures a player.
If damage is high enough to kill the player, he will receive the "Killed by <Shooter>" message.

Example

var i: byte;
begin
  for i := 1 to 32 do if Players[i].Active then
    Players[i].Damage(i,4000); //kills all active players, BOOYEAH
end;