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

[Gesior ACC]Show top balance

Aeron

www.Asgard-World.com
Joined
Jul 23, 2009
Messages
231
Reaction score
3
Location
Spain
This is my first script. I saw a widnet layout and I edited one of his scipts. It shows in web a list of top balance (Money in bank).
Tested on TFS 0.3.4

PHP:
<?php
		$limitt = 5;
		$skills = $SQL->query('SELECT name,level,balance FROM players WHERE group_id < '.$config['site']['players_group_id_block'].' AND name != "Account Manager" ORDER BY balance DESC, balance DESC LIMIT '.$limitt)->fetchAll();
		$number_of_rows = 0;
		foreach($skills as $skillss)
		{
			$number_of_rows++;
		 echo '<li class="bg6"><a href="index.php?subtopic=characters&name='.urlencode($skillss['name']).'"  class="link2">'.$skillss['name'].'</a><br>';
		 echo '<em class="style2">Balance: <b>'.urlencode($skillss['balance']).' gold coins.</b></em></li>';
		}
?>

If you want to show more of o players change this:
PHP:
		$limitt = 5;
Replace the 5 for the number of player to show.

Credits for widnet
 
yeah from bank, it is impossible to check from bp, maybe is possible but too much checks for procesor ;)
 
small edit

PHP:
   <?php
        $limitt = 5;
        $slect_balance = $SQL->query('SELECT name,level,balance FROM players WHERE group_id < '.$config['site']['players_group_id_block'].' AND name != "Account Manager" ORDER BY balance DESC, balance DESC LIMIT '.$limitt)->fetchAll();
        $number_of_rows = 0;
        foreach($slect_balance as $balance)
        {
        $number_of_rows++;
         echo '<li class="bg6"><a href="index.php?subtopic=characters&name='.urlencode($balance['name']).'"  class="link2">'.$balance['name'].'</a><br>';
         echo '<em class="style2">Balance: <b>'.urlencode($balance['balance']).' gold coins.</b></em></li>';
        }
?>
 
Back
Top