Difference between revisions of "TActivePlayer.ChangeTeam"

From Soldat Community Wiki
Jump to: navigation, search
(Created page with " '''''procedure ChangeTeam(NewTeam: Byte; JoinType: TJoinType)''''' NewTeam: ID of new team (0-5) JoinType: TJoinType ==Description== Moves player to a specified t...")
 
m (fix typo (team id))
 
Line 9: Line 9:
 
Players[1].ChangeTeam(1, TJoinNormal); // Moves player with ID 1 to Alpha team
 
Players[1].ChangeTeam(1, TJoinNormal); // Moves player with ID 1 to Alpha team
  
Players[2].ChangeTeam(1, TJoinSilent); // Moves player with ID 2 to Bravo team and hides join message ("has joined bravo team")
+
Players[2].ChangeTeam(2, TJoinSilent); // Moves player with ID 2 to Bravo team and hides join message ("has joined bravo team")
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
[[Category:TActivePlayer]]
 
[[Category:TActivePlayer]]

Latest revision as of 20:38, 16 April 2021

procedure ChangeTeam(NewTeam: Byte; JoinType: TJoinType)
 NewTeam: ID of new team (0-5)
 JoinType: TJoinType

Description

Moves player to a specified team

Example

Players[1].ChangeTeam(1, TJoinNormal); // Moves player with ID 1 to Alpha team

Players[2].ChangeTeam(2, TJoinSilent); // Moves player with ID 2 to Bravo team and hides join message ("has joined bravo team")