• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Help WEB killstatistics.php

Jamzitox

ImperiUs Online
Joined
May 30, 2008
Messages
245
Reaction score
0
Location
Venezuela/Margarita
asdssssssssssssssssssss.jpg


Because deaths out on the website?

Use Mystic Spirit :S!
 
explica mas detalles del problema y trata de mejorar tu ingles -.-

Which TFS distro are you using?
Are there players killed on your ots?
Bug might be related to wrong selected world ID, if tfs0,3,5pl1
 
Cuando mueren las personas No me sale En la web Ni en la database no se registra -_-!
estas seguro que no se registran? lo verificaste viendolo en tu phpmyadmin o sqlite?
detalla bien tu ot, cual tfs es y algo que de a entender mas el problema
postea tu script php de las estadisticas de muerte
 
Aqui esta Los Scripts Que tengo y uso Mystic Spirit 0.2

web: killstatistics.php
<?PHP
$players_deaths_data = $SQL->query('SELECT * FROM players,player_deaths WHERE players.id = player_deaths.player_id ORDER BY time DESC LIMIT '.$config['site']['last_deaths_limit']);
$number_of_players_deaths = 0;
if(!empty($players_deaths_data)) {
$vowels = array("e", "y", "u", "i", "o", "a");
foreach($players_deaths_data as $dead) {
$number_of_players_deaths++;
if(is_int($number_of_players_deaths / 2)) {
$bgcolor = $config['site']['darkborder'];
}
else
{
$bgcolor = $config['site']['lightborder'];
}
$players_rows .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH="30"><center>'.$number_of_players_deaths.'.</<center></TD><TD><a href="index.php?subtopic=characters&name='.$dead['name'].'"><b>'.$dead['name'].'</b></a> killed at level <b>'.$dead['level'].'</b> by ';
if($dead['is_player'] == 1) {
$players_rows .= '<a href="index.php?subtopic=characters&name='.$dead['killed_by'].'"><b>'.$dead['killed_by'].'</b></a>';
}
else
{
if($dead['killed_by'] == "-1")
{
$players_rows .= "item or field";
}
else
{
if(in_array(substr(strtolower($dead['killed_by']), 0, 1), $vowels))
{
$players_rows .= "an ";
}
else
{
$players_rows .= "a ";
}
$players_rows .= $dead['killed_by'];
}
}
$players_rows .= '.</TD></TR>';
}
}
if($number_of_players_deaths == 0) {
//server status - server empty
$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><B>Last Deaths</B></TD></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1><TR><TD>No one died on '.$config['server']['serverName'].'.</TD></TR></TABLE></TD></TR></TABLE><BR>';
}
else
{
//server status - someone is online
$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><B>Last Deaths</B></TD></TR></TABLE>';
//list of players
$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>'.$players_rows.'</TABLE>';
}
?>

Database: player_deaths
CREATE TABLE IF NOT EXISTS `player_deaths` (
`player_id` int(11) NOT NULL,
`time` bigint(20) unsigned NOT NULL default '0',
`level` int(11) NOT NULL default '1',
`killed_by` varchar(255) NOT NULL,
`is_player` tinyint(1) NOT NULL default '1',
KEY `player_id` (`player_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 
Back
Top