TTeam.Add

From Soldat Community Wiki
Revision as of 13:33, 24 July 2013 by Mighty (talk | contribs) (Example)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
procedure Add(Player: TPlayer)
 Player: a Player that is supposed to be added to the Team

Description

Adds a player to Team's players list.
Changes player's team in game

Example

Example shown will move all players in Red team to Blue team.

var
  p: TPlayer; // not needed, added for clarity
begin
  while Team[1].Count > 0 do
  begin
    p := Team[1].Player[0];
    Team[2].Add(p);
  end;
end;