Hi, I wanted to make that only one player gets unjusited frag so in config.lua I made:
It works good in game, but on the website in characters.php - deaths there is: "Killed at level ... by ..." and there is shown only one player :/ Is it possible to show here for example 5 players?
characters.php
Code:
deathAssistCount = 0
It works good in game, but on the website in characters.php - deaths there is: "Killed at level ... by ..." and there is shown only one player :/ Is it possible to show here for example 5 players?
characters.php
Code:
$deads = 0;
//deaths list
$player_deaths = $SQL->query('SELECT ' . $SQL->fieldName('id') . ', ' . $SQL->fieldName('date') . ', ' . $SQL->fieldName('level') . ' FROM ' . $SQL->tableName('player_deaths') . ' WHERE ' . $SQL->fieldName('player_id') . ' = '.$player->getId().' ORDER BY ' . $SQL->fieldName('date') . ' DESC LIMIT 10');
foreach($player_deaths as $death)
{
$bgcolor = (($number_of_rows++ % 2 == 1) ? $config['site']['darkborder'] : $config['site']['lightborder']);
$deads++;
$dead_add_content .= "<tr bgcolor=\"".$bgcolor."\"><td height=\"22\" width=\"23%\" align=\"center\">".date("j M Y, H:i", $death['date'])."</td><td height=\"22\" p style=\"padding-left: 4px;\">";
$killers = $SQL->query('SELECT ' . $SQL->tableName('environment_killers') . '.' . $SQL->fieldName('name') . ' AS monster_name, ' . $SQL->tableName('players') . '.' . $SQL->fieldName('name') . ' AS player_name, ' . $SQL->tableName('players') . '.' . $SQL->fieldName('deleted') . ' AS player_exists FROM ' . $SQL->tableName('killers') . ' LEFT JOIN ' . $SQL->tableName('environment_killers') . ' ON ' . $SQL->tableName('killers') . '.' . $SQL->fieldName('id') . ' = ' . $SQL->tableName('environment_killers') . '.' . $SQL->fieldName('kill_id') . ' LEFT JOIN ' . $SQL->tableName('player_killers') . ' ON ' . $SQL->tableName('killers') . '.' . $SQL->fieldName('id') . ' = ' . $SQL->tableName('player_killers') . '.' . $SQL->fieldName('kill_id') . ' LEFT JOIN ' . $SQL->tableName('players') . ' ON ' . $SQL->tableName('players') . '.' . $SQL->fieldName('id') . ' = ' . $SQL->tableName('player_killers') . '.' . $SQL->fieldName('player_id') . ' WHERE ' . $SQL->tableName('killers') . '.' . $SQL->fieldName('death_id') . ' = ' . $SQL->quote($death['id']) . ' ORDER BY ' . $SQL->tableName('killers') . '.' . $SQL->fieldName('final_hit') . ' DESC, ' . $SQL->tableName('killers') . '.' . $SQL->fieldName('id') . ' ASC')->fetchAll();
$i = 0;
$count = count($killers);
foreach($killers as $killer)
{
$i++;
if($i == 1)
{
if($count <= 4)
$dead_add_content .= "Killed at level <b>".$death['level']."</b> by ";
elseif($count > 4 and $count < 10)
$dead_add_content .= "Slain at level <b>".$death['level']."</b> by ";
elseif($count > 9 and $count < 15)
$dead_add_content .= "Crushed at level <b>".$death['level']."</b> by ";
elseif($count > 14 and $count < 20)
$dead_add_content .= "Eliminated at level <b>".$death['level']."</b> by ";
elseif($count > 19)
$dead_add_content .= "Annihilated at level <b>".$death['level']."</b> by ";
}
elseif($i == $count)
$dead_add_content .= " and ";
else
$dead_add_content .= ", ";
if($killer['player_name'] != "")
{
if($killer['monster_name'] != "")
$dead_add_content .= htmlspecialchars($killer['monster_name'])." summoned by ";
if($killer['player_exists'] == 0)
$dead_add_content .= "<b><A style=\"text-decoration: none;\" href=\"index.php?subtopic=characters&name=".urlencode($killer['player_name'])."\">";
$dead_add_content .= htmlspecialchars($killer['player_name']);
if($killer['player_exists'] == 0)
$dead_add_content .= "</a></b>";
}
elseif($killer['monster_name'] == "undefined")
$dead_add_content .= "a field item";
else
$dead_add_content .= htmlspecialchars($killer['monster_name']);
}
$dead_add_content .= ".";
$dead_add_content .= "</td></tr>";
}
if($deads > 0)
$main_content .= '<br><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR height="22" background="' . $layout_name . '/images/news/newsheadline_background.gif"><td height="22" COLSPAN=2 CLASS=white><B> Deaths</B></TD></TR>' . $dead_add_content . '</TABLE>';