Manatee Hunter
Valued Member!
Anyone going to post a way to install the heatmap - no idea how. Need a moron proof guide :S
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
A friend of mine forked the dayzmapper repo and added support for stashes in 1.7.7.1 (show up as brown tents) and updated the supported weapons list so most weapons will show up in the player tooltip. Check it out here: https://github.com/wterpstra/DayZMapper
$query = $db->prepare("SELECT
objectID id,
worldspace,
classname otype,
inventory,
last_updated,
objectUID customvalues1
<?php
// Works with schema 0.36
error_reporting(-1);
header('Content-Type: text/plain');
// Avoid browser caching
header('Cache-Control: no-cache, must-revalidate');
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
include('config.php');
try {
$db = new PDO('mysql:host='.$db['host'].';port='.$db['port'].';dbname='.$db['database'], $db['user'], $db['password']);
} catch(PDOException $e) {
die($e -> getMessage());
}
echo '<stuff>' . "\n";
echo "\t<icons>".($config['icons']?"true":"false")."</icons>\n";
// Fetch players
$query = $db->prepare("SELECT
s.characterid id,
s.model,
s.currentstate state,
s.worldspace as worldspace,
s.inventory,
p.playername name,
s.humanity,
s.last_updated,
concat(s.KillsH, ' (', p.killsHtotal, ')') survivor_kills,
concat(s.KillsB, ' (', p.KillsBtotal, ')') bandit_kills
FROM
character_data s
INNER JOIN
player_data p on p.PlayerUID = s.PlayerUID
WHERE
s.last_updated > DATE_SUB(now(), INTERVAL 5 MINUTE)
AND
s.Alive = 1");
$query->execute(array($config['instance']));
$rows = $query->fetchAll(PDO::FETCH_ASSOC);
foreach($rows as $row)
{
$posArray = json_decode($row['worldspace']);
$row['x'] = $posArray[1][0];
$row['y'] = -($posArray[1][1]-15365);
$row['age'] = strtotime($row['last_updated']) - time();
$row['name'] = htmlspecialchars($row['name']);
echo "\t" . '<player>' . "\n";
foreach($row as $k => $v)
{
echo "\t\t" . '<' . $k . '><![CDATA[' . $v . ']]></' . $k . '>' . "\n";
}
echo "\t" . '</player>' . "\n";
}
// Fetch vehicles
$query = $db->prepare("SELECT
objectID id,
worldspace,
classname otype,
inventory,
last_updated
FROM
object_data
WHERE
(classname != 'Tentstorage' and classname != 'stashsmall' and classname != 'stashmedium' and instance = ?)");
$query->execute(array($config['instance']));
$rows = $query->fetchAll(PDO::FETCH_ASSOC);
foreach($rows as $row)
{
$posArray = json_decode($row["worldspace"]);
$row['x'] = $posArray[1][0];
$row['y'] = -($posArray[1][1]-15365);
$row['age'] = strtotime($row['last_updated']) - time();
echo "\t" . '<vehicle>' . "\n";
$tempid = "000";
foreach($row as $k => $v)
{
$stringid = "id";
$stringotype = "otype";
if(strstr($k,$stringid)) {
$tempid = $v;
}
if(strstr($k,$stringotype)) {
echo "\t\t" . '<' . $k . '><![CDATA[' . $v . "\nObjectID: " . $tempid . ']]></' . $k . '>' . "\n";
} else {
echo "\t\t" . '<' . $k . '><![CDATA[' . $v . ']]></' . $k . '>' . "\n";
}
}
echo "\t" . '</vehicle>' . "\n";
}
// Fetch deployables
$query = $db->prepare("SELECT
objectID id,
worldspace,
classname otype,
inventory,
last_updated
FROM
object_data
WHERE
(classname = 'Tentstorage' or classname = 'stashsmall' or classname = 'stashmedium' and instance = ?)");
$query->execute(array($config['instance']));
$rows = $query->fetchAll(PDO::FETCH_ASSOC);
foreach($rows as $row)
{
$posArray = json_decode($row['worldspace']);
$row['x'] = $posArray[1][0];
$row['y'] = -($posArray[1][1]-15365);
echo "\t" . '<deployable>' . "\n";
$tempid = "000";
foreach($row as $k => $v)
{
$stringid = "id";
$stringotype = "otype";
if(strstr($k,$stringid)) {
$tempid = $v;
}
if(strstr($k,$stringotype)) {
echo "\t\t" . '<' . $k . '><![CDATA[' . $v . "\nObjectID:" . $tempid . ']]></' . $k . '>' . "\n";
} else {
echo "\t\t" . '<' . $k . '><![CDATA[' . $v . ']]></' . $k . '>' . "\n";
}
}
echo "\t" . '</deployable>' . "\n";
}
echo '</stuff>' . "\n";
?>
Is your project available now? if so, where can i download it?I've modified your project a wee bit, Falcon.
- Changed icons to match vehicle type
- Changed stash icons
- added record ID info to all popups
- added name of player who deployed each deployable in the popup
![]()
I'm adding more to it but perhaps I'll fork it properly and make it available when I'm done, if you have no problem with that, Falcon
[edit] Works with 1.8