TGame.OnJoin

From Soldat Community Wiki
Revision as of 13:27, 26 July 2013 by Mighty (talk | contribs) (Example)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
property OnJoin
 Access mode: RW
 Event handler type: TOnJoinGameEvent
 Event handler declaration: procedure (Player: TActivePlayer; Team: TTeam);

Description

Event property called when a player joins the server.

Example

 procedure SpecOnJoin(Player: TActivePlayer; Team: TTeam);
 begin
   Player.Team := 5;
 end;

 // ...

 begin
   // assign OnJoin handler
   Game.OnJoin := @SpecOnJoin;

   // ...

   // unassign
   Game.OnJoin := nil;
 end;