TTeam.Add

From Soldat Community Wiki
Revision as of 13:24, 24 July 2013 by Mighty (talk | contribs) (new page)
(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 
  i: byte;
  p: TPlayer;
begin
  for i := 0 to Team[1].Count - 1 do 
  begin
    p := Team[1].Player[i];
    Team[2].Add(p);
  end;
end;