Example #1
0
     $PlayerGames = $ComparePlayersData[$c]["games"];
 }
 if ($ComparePlayersData[$c]["games"] > $temp_games) {
     $MostGames = $row["player"];
     $PlayerGames = $ComparePlayersData[$c]["games"];
     $temp_games = $ComparePlayersData[$c]["games"];
 }
 //MOST WINS
 if (!isset($MostWins)) {
     $MostWins = $row["player"];
     $temp_wins = $ComparePlayersData[$c]["winslosses"];
     $PlayerWins = $ComparePlayersData[$c]["winslosses"];
 }
 if ($ComparePlayersData[$c]["winslosses"] > $temp_wins) {
     $MostWins = $row["player"];
     $PlayerWins = OS_Number($ComparePlayersData[$c]["winslosses"]);
     $temp_wins = $ComparePlayersData[$c]["winslosses"];
 }
 //STAY RATIO
 if (!isset($MostStay)) {
     $MostStay = $row["player"];
     $temp_stay = $ComparePlayersData[$c]["stayratio"];
     $PlayerStay = $ComparePlayersData[$c]["stayratio"];
     $PlayerStayGames = $row["games"];
 }
 //Highest stay ratio + games played
 if ($ComparePlayersData[$c]["stayratio"] > $temp_stay) {
     $MostStay = $row["player"];
     $PlayerStay = $ComparePlayersData[$c]["stayratio"];
     $temp_stay = $ComparePlayersData[$c]["stayratio"];
     $PlayerStayGames = $row["games"];
Example #2
0
    function OS_UserAchievements()
    {
        global $UserData;
        global $TimePlayed;
        if (OS_single_user() and !empty($UserData)) {
            $score = OS_Number($UserData[0]["score"]);
            $kills = OS_Number($UserData[0]["kills"]);
            $assists = OS_Number($UserData[0]["assists"]);
            $deaths = OS_Number($UserData[0]["deaths"]);
            $winslosses = $UserData[0]["winslosses"];
            $kd = OS_Number($UserData[0]["kd"]);
            $games = OS_Number($UserData[0]["games"]);
            $wins = OS_Number($UserData[0]["wins"]);
            $losses = OS_Number($UserData[0]["losses"]);
            $creeps = OS_Number($UserData[0]["creeps"]);
            $towers = OS_Number($UserData[0]["towers"]);
            $denies = OS_Number($UserData[0]["denies"]);
            $rax = OS_Number($UserData[0]["rax"]);
            $kpm = OS_Number($UserData[0]["kpg"]);
            $dpm = OS_Number($UserData[0]["dpg"]);
            $neutrals = OS_Number($UserData[0]["neutrals"]);
            if ($kills > 0) {
                $kp = ROUND($kills / ($kills + $deaths), 4) * 100;
            } else {
                $kp = 0;
            }
            $PTIME = explode("h ", $TimePlayed["timeplayed"]);
            $PlayedTime = $PTIME[0];
            ?>
	<div class="padTop"></div>
	<div class="padTop"></div>
	
	<div class="aligncenter">
	   <a href="javascript:;" onclick="showhide('achievements')"><h2>Achievements</h2></a>
	</div>
	
	<div id="achievements">
	  <table>
	  <?php 
            echo OS_ShowAchievement($kills, killsGoal, "kills.png", "Kill", "enemy heroes.", "");
            ?>
	  <?php 
            echo OS_ShowAchievement($assists, assistsGoal, "assist.png", "Assist in", "kills.", "");
            ?>
	  <?php 
            echo OS_ShowAchievement($winslosses, winslossesGoal, "wins.png", "Achieve ", "wins.", "%");
            ?>
      <?php 
            echo OS_ShowAchievement($kp, kpGoal, "killperc.gif", "Achieve ", "kills.", "%");
            ?>
      <?php 
            echo OS_ShowAchievement($games, gamesGoal, "games.png", "Play ", "games.", "");
            ?>
      <?php 
            echo OS_ShowAchievement($wins, winsGoal, "winperc.gif", "Win ", "games.", "");
            ?>
	  <?php 
            echo OS_ShowAchievement($creeps, creepsGoal, "creeps.gif", "Kill ", "creeps.", "");
            ?>
	  <?php 
            echo OS_ShowAchievement($denies, denieGoal, "denies.gif", "Deny ", "creeps.", "");
            ?>
      <?php 
            echo OS_ShowAchievement($towers, towersGoal, "towers.png", "Destroy ", "towers.", "");
            ?>
      <?php 
            echo OS_ShowAchievement($neutrals, neutralsGoal, "neutrals.png", "Kill ", "neutrals.", "");
            ?>
      <?php 
            echo OS_ShowAchievement($PlayedTime, PlayTimeGoal, "play.gif", "Play at least", "hours.", "");
            ?>
	  </table>
	  <?php 
            ?>
	</div>
	<?php 
        }
    }