";
$file = "../outcry_home/server/logs/gamestat.txt";
$contents = file($file);
$players = str_replace("Players: ", "", $contents[1]);
$map = str_replace("Map: ", "", $contents[2]);
$mode = str_replace("Gamemode: ", "", $contents[3]);
$timeleft = str_replace("Timeleft: ", "", $contents[4]);
$alpha = str_replace("Team 1: ", "", $contents[5]);
$bravo = str_replace("Team 2: ", "", $contents[6]);
echo "Information
";
echo "Name: SNAG Server
";
echo "Players: $players / 12
";
echo "Mode: $mode
";
echo "Map: $map
";
echo "Timeleft: $timeleft
";
//echo "Real time ove rview
";
echo "
Commands
";
echo "* !map mapname - change map
";
echo "* !pause - pause / unpause the game
";
echo "* !restart - restart map
";
echo "* !ping - test if bot is running
";
echo "
Team scores
";
echo "Alpha: $alpha
";
echo "Bravo: $bravo
";
echo "
Players Online
";
echo "(Name / Points / Deaths / Ping)
";
for($i = 0; $i < $players; $i++) {
$pos = 10 + ($i * 5);
$name = htmlentities(trim($contents[$pos]));
$points = trim($contents[$pos+1]);
$deaths = trim($contents[$pos+2]);
$team = trim($contents[$pos+3]);
$ping = trim($contents[$pos+4]);
if($team == 1){
echo "";
}elseif($team == 2){
echo "";
}else{
echo "";
}
echo $name;
echo " / ";
echo $points;
echo " / ";
echo $deaths;
echo " / ";
echo $ping;
echo "
";
}
echo "
";
?>