public function loadVotes($players = array(), $getVotesOnly = false)
    {
        if (!$this->connected) {
            $this->console->writeln('> MxKarma trying to load votes when not connected: $ff0aborting!');

            return;
        }

        $this->console->writeln('> MxKarma attempting to load votes...');
        $params = array("sessionKey" => $this->sessionKey);
        $postData = [
            "gamemode" => $this->getGameMode(),
            "titleid" => $this->gameDataStorage->getVersion()->titleId,
            "mapuid" => $this->mapStorage->getCurrentMap()->uId,
            "getvotesonly" => $getVotesOnly,
            "playerlogins" => $players,
        ];

        $this->http->post(
            $this->buildUrl("getMapRating", $params),
            json_encode($postData),
            array($this, "xGetRatings"),
            [],
            $this->options
        );
    }
public function loadVotes($players = array(), $getVotesOnly = false)
    {
        if (!$this->connected) {
            $this->console->writeln('> MxKarma trying to load votes when not connected: $ff0aborting!');

            return;
        }

        $this->console->writeln('> MxKarma attempting to load votes...');
        $params = array("sessionKey" => $this->sessionKey);
        $postData = [
            "gamemode" => $this->getGameMode(),
            "titleid" => $this->gameDataStorage->getVersion()->titleId,
            "mapuid" => $this->mapStorage->getCurrentMap()->uId,
            "getvotesonly" => $getVotesOnly,
            "playerlogins" => $players,
        ];

        $this->http->post(
            $this->buildUrl("getMapRating", $params),
            json_encode($postData),
            array($this, "xGetRatings"),
            [],
            $this->options
        );
    }
public function loadVotes ( $ players = array ( ) , $ getVotesOnly = false ) { if ( ! $ this -> connected ) { $ this -> console -> writeln ( '> MxKarma trying to load votes when not connected: $ff0aborting!' ) ; return ; } $ this -> console -> writeln ( '> MxKarma attempting to load votes...' ) ; $ params = array ( "sessionKey" => $ this -> sessionKey ) ; $ postData = [ "gamemode" => $ this -> getGameMode ( ) , "titleid" => $ this -> gameDataStorage -> getVersion ( ) -> titleId , "mapuid" => $ this -> mapStorage -> getCurrentMap ( ) -> uId , "getvotesonly" => $ getVotesOnly , "playerlogins" => $ players , ] ; $ this -> http -> post ( $ this -> buildUrl ( "getMapRating" , $ params ) , json_encode ( $ postData ) , array ( $ this , "xGetRatings" ) , [ ] , $ this -> options ) ; }
loads votes from server
@param array $players
@param bool  $getVotesOnly
loads votes from server