TActivePlayer.OnBeforeRespawn

From Soldat Community Wiki
Revision as of 22:57, 6 May 2020 by H (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
property OnBeforeRespawn
 Access mode: RW
 Event handler type: TOnBeforeRespawnEvent
 Event handler declaration: function (Player: TActivePlayer): TVector;

Description

Event property called right before a player has respawned.
In this event Player.Alive is FALSE (unless he's just joined the server)

Example

// Result is the position you want from player to be spawned on, for default player spawns at spawnpoint
function OnBeforeRespawn(Player: TActivePlayer): TVector;
begin
  Result.X := 500;
  Result.Y := 30;
end;