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

Top 5 Players script

Just 1. Name
2. Name
3. Name
4. Name
5. Name

It will be showing on main page at right, I just need the script..

Code:
<h1>Top 5<small> Players</small></h1> 
            <ul> 
<?php 
                            $limitt = 5; 
                            $zap = $SQL->query('SELECT `name`, `level` FROM `players` WHERE `group_id` < '.$config['site']['players_group_id_block'].' AND `name` != "Account Manager" ORDER BY `level` DESC, `experience` DESC LIMIT 5;'); 
                            $number_of_rows = 0; 
                            foreach($zap as $wynik) 
                            { 
                             $number_of_rows++; 
                             echo '<li class="light">'.$number_of_rows.'. <a href="index.php?subtopic=characters&name='.urlencode($wynik['name']).'" >'.$wynik['name'].'</a> <br> Level: <b>('.$wynik['levell'].')</b></li>'; 
                            } 
                        ?> 
            </ul>

Don't know is workin cuz i didn't check.
 
Bumping this thread, that script got one problem, the levels won't show in the script, it shows like this:
PHP:
1. Sorcerer Sample
Level: ()

Anyone know how to fix it?
Thanks.
 
lil typo:
PHP:
<h1>Top 5<small> Players</small></h1> 
            <ul> 
<?php 
                            $limitt = 5; 
                            $zap = $SQL->query('SELECT `name`, `level` FROM `players` WHERE `group_id` < '.$config['site']['players_group_id_block'].' AND `name` != "Account Manager" ORDER BY `level` DESC, `experience` DESC LIMIT 5;'); 
                            $number_of_rows = 0; 
                            foreach($zap as $wynik) 
                            { 
                             $number_of_rows++; 
                             echo '<li class="light">'.$number_of_rows.'. <a href="index.php?subtopic=characters&name='.urlencode($wynik['name']).'" >'.$wynik['name'].'</a> <br> Level: <b>('.$wynik['level'].')</b></li>'; 
                            } 
                        ?> 
            </ul>
 
What exactly are you looking after? Showing the ones who have spent most premium points or got the most points at their account?

lil typo:
PHP:
<h1>Top 5<small> Players</small></h1> 
            <ul> 
<?php 
                            $limitt = 5; 
                            $zap = $SQL->query('SELECT `name`,  `level` FROM `players` WHERE `group_id` <  '.$config['site']['players_group_id_block'].' AND `name` != "Account  Manager" ORDER BY `level` DESC, `experience` DESC LIMIT 5;'); 
                            $number_of_rows = 0; 
                            foreach($zap as $wynik) 
                            { 
                             $number_of_rows++; 
                             echo '<li  class="light">'.$number_of_rows.'. <a rel="nofollow"  href="index.php?subtopic=characters&amp;name='.urlencode($wynik['name']).'"  >'.($wynik['online']>0 ? "<font color=\"green\">".$wynik['name']."</font>" : "<font color=\"red\">".$wynik['name']."</font>").'</a> <br> Level:  <b>('.$wynik['level'].')</b></li>'; 
                            } 
                        ?> 
            </ul>

Added so it shows if the player is online or offline x)
 
Back
Top