TActivePlayer.OnBeforeRespawn

From Soldat Community Wiki
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;