• 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!

[Modern AAC] Top Fraggers

Paxton

Banned User
Joined
Feb 23, 2008
Messages
4,110
Reaction score
48
Location
London, UK
Top fraggers, originaly made by Elf for Gesior AAC - Changed by me to work with Modern AAC.

Go to admin panel. www.exmaple.com/index.php/admin (You have to be logged as an admin [account with page access 5 or higher by default])

Go to pages, click Create Page, put the name for example Fraggers and paste this into the box:

PHP:
<?php
//Script by Elf
//Made for Modern AAC by Paxton
require("config.php");
$ots = POT::getInstance();
$ots->connect(POT::DB_MYSQL, connection());
$SQL = $ots->getDBHandle();
echo '<div style="text-align: center; font-weight: bold;">Top 30 frags on ' . $config['server_name'] . '</div>
<table border="0" cellspacing="1" cellpadding="4" width="100%">
 <tr>
  <td  style="text-align: center; font-weight: bold;">Name</td>
  <td  style="text-align: center; font-weight: bold;">Frags</td>
 </tr>';

$i = 0;
foreach($SQL->query('SELECT `p`.`name` AS `name`, COUNT(`p`.`name`) as `frags`
 FROM `killers` k
 LEFT JOIN `player_killers` pk ON `k`.`id` = `pk`.`kill_id`
 LEFT JOIN `players` p ON `pk`.`player_id` = `p`.`id`
WHERE `k`.`unjustified` = 1 AND `k`.`final_hit` = 1
 GROUP BY `name`
 ORDER BY `frags` DESC, `name` ASC
 LIMIT 0,30;') as $player)
{
 $i++;
 echo '<tr>
  <td><a href="'.WEBSITE.'/index.php/character/view/'.$player['name'].'"><center>' . $player['name'] . '</center></a></td>
  <td><center>' . $player['frags'] . '</center></td>
 </tr>';
}

echo '</table>';
?>

Click save, and now go to fraggers click on it. You will be redirected to your subpage, you see the link just add it in the template to have it visible on template :) Thats it :w00t:
 
Great! We are starting to get stuff for modern aac now D:

@oftopic: Paxton starting a RL map D:!
 
Can you just add of this stuff into your AAC instead of releasing pieces?
 
go localhost/ on web browser.

Login > as youre admin nick, password > Now click admin panel > Create Page.

Add all contence.

Done.
 
So I've imported the scripts and on the webpage it hasnt updated with the frags even though there has been frags.. any reason for this? How often does the page update?
 

Similar threads

Back
Top