Beispiel #1
0
 public function createPlayerAndGetLoginPlayerObject($strGroup)
 {
     $newPlayer->returnCode = 1;
     $userName;
     while ($newPlayer->returnCode == 1) {
         $userName = $strGroup . "_" . Players::rand_string(5);
         $newPlayer = Players::createPlayer($userName, $strGroup, $strGroup . "-player", '', '', $strGroup);
     }
     if ($newPlayer) {
         return Players::getLoginPlayerObject($userName, $strGroup);
     }
     return new returnData(1, NULL, 'error...');
 }