Esempio n. 1
0
 /** Balances teams.
  * This function balances the teams according to the arrival order of the players. 
  * It is executed on new connections and when a player changes team (if AutoTeams is enabled in plugin config).
  * It only changes the team of new players. 
  * 
  * \param $server The server that has requested the balance.
  * 	 
  * \return Nothing.
  */
 public function WSMethodBalanceTeams($server)
 {
     $actual = Server::getName();
     Server::setServer($this->_main->servers[$server]);
     Rcon::setServer($this->_main->servers[$server]);
     $this->_balance();
     Server::setServer($this->_main->servers[$actual]);
     Rcon::setServer($this->_main->servers[$actual]);
 }