Class MapList

Documentation of includes/core/maplist.class.php

Stores information about all Maps on the dedicated server and provides several functions for sorting.

Methods

getMapByUid

Returns a Class Map object of the given UID form the current map list from the dedicated server.

Description

Class Map object = getMapByUid ( $uid )

If map can not be found, then a empty map object is returned. When $map->uid is false, then the map was not present in the current map list.

Parameters

  • $uid

    The UID from a map.

Example

$uid = 'g6BQJO4wlyolDbhsLvau7R7g7Ml';
$map = $aseco->server->maps->getMapByUid($uid);

removeMapByUid

Removes the Map with the given UID form the current map list from the dedicated server.

Description

boolean = removeMapByUid ( $uid )

Parameters

  • $uid

    The UID from a map.

Example

$uid = 'g6BQJO4wlyolDbhsLvau7R7g7Ml';
$result = $aseco->server->maps->removeMapByUid($uid);

getMapById

Returns a Class Map object of the given ID form the current map list from the dedicated server.

Description

Class Map object = getMapById ( $id )

If map can not be found, then a empty map object is returned. When $map->uid is false, then the map was not present in the current map list.

Parameters

  • $id

    The ID from a map.

Example

$id = 87;
$map = $aseco->server->maps->getMapById($id);

getMapByFilename

Returns a Class Map object of the given filename form the current map list from the dedicated server.

Description

Class Map object = getMapByFilename ( $filename )

If map can not be found, then a empty map object is returned. When $map->uid is false, then the map was not present in the current map list.

Parameters

  • $filename

    The filename from a map.

Example

$filename = 'Short Distance N_ 07_13156.Map.gbx';
$map = $aseco->server->maps->getMapByFilename($filename);

removeMapByFilename

Removes the Map with the given Filename form the current map list from the dedicated server.

Description

boolean = removeMapByFilename ( $filename )

Parameters

  • $filename

    The filename from a map.

Example

$filename = 'Short Distance N_ 07_13156.Map.gbx';
$result = $aseco->server->maps->removeMapByFilename($filename);

getPreviousMap

Returns a Class Map object of the previous map played.

Description

Class Map object = getPreviousMap ( void )

Example

$map = $aseco->server->maps->getPreviousMap();

getCurrentMap

Returns a Class Map object of the current map.

Description

Class Map object = getCurrentMap ( void )

Example

$map = $aseco->server->maps->getCurrentMap();

getNextMap

Returns a Class Map object of the next map in the dedicated server map list.

Description

Class Map object = getNextMap ( boolean $ignore_playlist )

If map can not be found, then a empty map object is returned. When $map->uid is false, then the map was not present in the current map list.

Parameters

  • $ignore_playlist

    If true, then the playlist will be ignored and the dedicated server will be asked which map is the next map.

Example

$map = $aseco->server->maps->getNextMap();

getThumbnailByUid

Returns the JPEG-Image from the Map of the given UID form the current map list from the dedicated server.

Description

JPEG-Image = getThumbnailByUid ( string $uid )

If map can not be found or the image does not exists, then false is returned.

Parameters

  • $uid

    The UID from a map.

Example

$uid = 'g6BQJO4wlyolDbhsLvau7R7g7Ml';
$image = $aseco->server->maps->getThumbnailByUid($uid);

count

Returns the amount of maps in the map list.

Description

int = count ( void )

Example

$amount = $aseco->server->maps->count();

Return Values

138

parseMap

Parses a given Map file with the GBXChallMapFetcher Class.

Description

Class GBXChallMapFetcher object = parseMap ( string $file )

Please note that you have to give the filename of the Map with full path informations.

Example

$file = 'GameServer/UserData/Maps/MX/Short Distance N_ 07_13156.Map.gbx';
$gbx = $aseco->server->maps->parseMap($file);

Class MapList

Documentation of includes/core/maplist.class.php

Stores information about all Maps on the dedicated server and provides several functions for sorting.

Properties

Members Example data or description
$aseco->server->maps->map_list array() of Class Map objects
$aseco->server->maps->current Class Map object
$aseco->server->maps->previous Class Map object
$aseco->server->maps->max_age_mxinfo 86400
$aseco->server->maps->size_limit 2097152

This is a private enthusiast Website. Maniaplanet, Trackmania, Shootmania, Nadeo are trademarks of Ubisoft Entertainment.
Windows is a registered trademark of Microsoft Corporation.

Last modified: Wed, 17 Apr 2019 22:21:04 +0200