protected function parsePlayers(Buffer &$buffer, Result &$result)
    {
        // By default there are 0 players
        $players = 0;

        // Iterate over the players until we run out
        while (($id = $buffer->readInt8()) != 32) {
            $result->addPlayer('id', $id);
            $result->addPlayer('ping', $buffer->readInt16());
            $result->addPlayer('name', $buffer->readString());
            $result->addPlayer('clantag_pos', $buffer->readInt8());
            $result->addPlayer('clantag', $buffer->readString());
            $result->addPlayer('bot', $buffer->readInt8());
            $players++;
        }

        // Let's add in the current players as a result
        $result->add('numplayers', $players);

        // Free some memory
        unset($id);
    }
protected function parsePlayers(Buffer &$buffer, Result &$result)
    {
        // By default there are 0 players
        $players = 0;

        // Iterate over the players until we run out
        while (($id = $buffer->readInt8()) != 32) {
            $result->addPlayer('id', $id);
            $result->addPlayer('ping', $buffer->readInt16());
            $result->addPlayer('name', $buffer->readString());
            $result->addPlayer('clantag_pos', $buffer->readInt8());
            $result->addPlayer('clantag', $buffer->readString());
            $result->addPlayer('bot', $buffer->readInt8());
            $players++;
        }

        // Let's add in the current players as a result
        $result->add('numplayers', $players);

        // Free some memory
        unset($id);
    }
protected function parsePlayers ( Buffer & $ buffer , Result & $ result ) { // By default there are 0 players $ players = 0 ; // Iterate over the players until we run out while ( ( $ id = $ buffer -> readInt8 ( ) ) != 32 ) { $ result -> addPlayer ( 'id' , $ id ) ; $ result -> addPlayer ( 'ping' , $ buffer -> readInt16 ( ) ) ; $ result -> addPlayer ( 'name' , $ buffer -> readString ( ) ) ; $ result -> addPlayer ( 'clantag_pos' , $ buffer -> readInt8 ( ) ) ; $ result -> addPlayer ( 'clantag' , $ buffer -> readString ( ) ) ; $ result -> addPlayer ( 'bot' , $ buffer -> readInt8 ( ) ) ; $ players ++ ; } // Let's add in the current players as a result $ result -> add ( 'numplayers' , $ players ) ; // Free some memory unset ( $ id ) ; }
Parse players out of the status ex response

@param Buffer $buffer
@param Result $result
Parse players out of the status ex response