This repository has been archived on 2024-07-18. You can view files and clone it, but cannot push or open issues or pull requests.
lwb5/scripts/game/beta5/fleet/library/getPlayerLocations.inc

22 lines
461 B
PHP

<?php
class beta5_fleet_getPlayerLocations {
function beta5_fleet_getPlayerLocations($lib) {
$this->lib = $lib;
$this->db = $this->lib->game->db;
}
// Returns all of the locations at which a player has stationned fleets
function run($pid) {
$q = $this->db->query("SELECT DISTINCT location FROM fleet WHERE location IS NOT NULL AND owner=$pid");
$a = array();
while ($r = dbFetchArray($q)) {
array_push($a, $r[0]);
}
return $a;
}
}
?>