Xampy
PHP | SQL | LUA | C++
- Joined
- Jun 22, 2008
- Messages
- 1,109
- Reaction score
- 17
Hello!
I'm releasing this in a request by kito2. It works with TFS 0.3.5, 0.3.6 & 0.4.
Here's the code that you must put after the deaths list code in characters.php file (C:/xampp/htdocs/):
Picture:
Regards.
I'm releasing this in a request by kito2. It works with TFS 0.3.5, 0.3.6 & 0.4.
Here's the code that you must put after the deaths list code in characters.php file (C:/xampp/htdocs/):
PHP:
//frags list by Xampy
$frags_limit = 10; // frags limit to show? // default: 10
$player_frags = $SQL->query('SELECT `player_deaths`.*, `players`.`name`, `killers`.`unjustified` FROM `player_deaths` LEFT JOIN `killers` ON `killers`.`death_id` = `player_deaths`.`id` LEFT JOIN `player_killers` ON `player_killers`.`kill_id` = `killers`.`id` LEFT JOIN `players` ON `players`.`id` = `player_deaths`.`player_id` WHERE `player_killers`.`player_id` = '.$player->getId().' ORDER BY `date` DESC LIMIT 0,'.$frags_limit.';');
if(count($player_frags))
{
$frags = 0;
$frag_add_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><br><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Victims</B></TD></TR>';
foreach($player_frags as $frag)
{
$frags++;
if(is_int($number_of_rows / 2)) $bgcolor = $config['site']['darkborder']; else $bgcolor = $config['site']['lightborder'];
$number_of_rows++;
$frag_add_content .= "<tr bgcolor=\"".$bgcolor."\">
<td width=\"20%\" align=\"center\">".date("j M Y, H:i", $frag['date'])."</td>
<td>".(($player->getSex() == 0) ? 'She' : 'He')." fragged <a href=\"index.php?subtopic=characters&name=".$frag[name]."\">".$frag[name]."</a> at level ".$frag[level]."";
$frag_add_content .= ". (".(($frag[unjustified] == 0) ? "<font size=\"1\" color=\"green\">Justified</font>" : "<font size=\"1\" color=\"red\">Unjustified</font>").")</td></tr>";
}
if($frags >= 1)
$main_content .= $frag_add_content . '</TABLE>';
}
// end of frags list by Xampy
Picture:
Regards.
Last edited: