Class MapHistory

Documentation of includes/core/maphistory.class.php

Map history for the dedicated server and provides several methods for the required handling of the history.

Methods

getPreviousMap

Returns a Class Map object from the map that was played before.

Description

Class Map object = getPreviousMap ( void )

This method returns a empty Class Map object if the previous map can not be found.

Example

$name = 'time_attack';
$id = $aseco->server->gameinfo->getModeId($name);

Return Values

2

You do not need to call this method by yourself, just use $this->server->maps->previous (which holds a Class Map) object instead!


isMapInHistoryById

With this method you can check if a map is already in the history.

Description

boolean = isMapInHistoryById ( $id )

Parameters

  • $id

    Database ID of the map to check.

Example

$result = $aseco->server->maps->history->isMapInHistoryById(10);

Return Values

true

isMapInHistoryByUid

With this method you can check if a map is already in the history.

Description

boolean = isMapInHistoryByUid ( $uid )

Parameters

  • $uid

    Class Map object uid of the map to check.

Example

$result = $aseco->server->maps->history->isMapInHistoryByUid($map->uid);

Return Values

true

Class MapHistory

Documentation of includes/core/maphistory.class.php

Map history for the dedicated server and provides several methods for the required handling of the history.

Properties

Members Description
$aseco->server->maps->history->settings['max_history_entries'] The amount of map that should be stored in the history e.g. 20
$aseco->server->maps->history->map_list An array of the last max_history_entries played maps

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:31 +0200