Difference between revisions of "TGame.OnRequest"

From Soldat Community Wiki
Jump to: navigation, search
(new page)
(No difference)

Revision as of 11:36, 26 July 2013

property OnRequest
 Access mode: RW
 Event handler type: TOnRequestEvent
 Event handler declaration: 
   function (Ip: string; Port: Word; State: Byte; Forwarded: Boolean; Password: string): Integer;

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;