TActivePlayer.OnFlagScore

From Soldat Community Wiki
Revision as of 11:17, 30 July 2013 by Mighty (talk | contribs) (new page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
property OnFlagScore
 Access mode: RW
 Event handler type: TOnFlagScoreEvent
 Event handler declaration: procedure (Player: TActivePlayer; Flag: TActiveFlag; Team: Byte);

Description

Event property called when a player scores a flag.

Example

Example code kills a flagger after he scores.

procedure OnFlagScoreKill(Player: TActivePlayer; Flag: TActiveFlag; Team: Byte);
begin
  Player.Alive := FALSE;
end;

var 
  i: Byte;
begin
  for i:=1 to 32 do
    Players[i].OnFlagScore := @OnFlagScoreKill;
end.