Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Top Online Player

Newbie Spellweaver
Joined
Jan 27, 2007
Messages
34
Reaction score
1
Hi guys,

i decided to make this small script, that show how many hours the player have spend on your server. It work with ODBC/Mssql, then no problem with your integration (MuWeb Module). This script show 25 player.

TheKamikaze - Top Online Player - RaGEZONE Forums


Thnx to Grissha for the screen

PHP:
<div align="center">
  <div align="center">
    <table width="50%" border="0" cellspacing="1" cellpadding="1">
      <tr>
        <td class="normal_text_white">Players</td>
        <td class="normal_text_white">Online Time</td>
        <td class="normal_text_white">Status</td>
      </tr>
  <?php

/**
 * @DjSoulz
 * @copyright 2008
 */
 
if( !isset($_GET['op']))
{
    require('../includes/denied.php');
    denied('Time');
}
require('config.php');

//We get the user
$online = $db->Execute('SELECT DISTINCT 
TOP 25
AccountCharacter.ID, 
AccountCharacter.GameIDC, 
MEMB_STAT.ServerName, 
MEMB_STAT.IP, 
MEMB_STAT.ConnectTM, 
MEMB_STAT.DisConnectTM,
MEMB_STAT.OnlineHours
from 
MEMB_STAT 
join 
AccountCharacter 
on 
Memb_stat.memb___id = AccountCharacter.ID
ORDER BY 
MEMB_STAT.OnlineHours DESC');
while($online_time = $online->fetchrow())
{
//Maybe the statut too
$statut = $db->Execute("Select ConnectStat FROM MEMB_STAT WHERE memb___id='".$online_time[0]."'");
$statut_ok = $statut->fetchrow();
if($statut_ok[0] == 1){$online_stat = '<span style="color:green"><b>Online</b></span>';}
elseif($statut_ok[0] == 0){$online_stat = '<span style="color:red"><b>Offline</b></span>';}
?>
      <tr>
        <td class="normal_text_white"><a href="index.php?op=character&character=<?=$online_time[1];?>"><?=$online_time[1];?></a></td>
        <td class="normal_text_white"><?=$online_time[6];?></td>
        <td class="normal_text_white"><?=$online_stat?></td>
      </tr>
  <?
}
?>
      </table>
</div>

You must put it in Modules/Most Online.php

Credit : Me (TheKamikaze/DjSoulz)
 
Last edited:
faronnia.com
Loyal Member
Joined
Aug 12, 2007
Messages
1,200
Reaction score
441
Re: [REALEASE]Top Online Player

Great work,I am impressed.I guess I will use this.
PS : I suck at PHP :(
But I am working on it :winky:
 
Newbie Spellweaver
Joined
Nov 12, 2007
Messages
60
Reaction score
0
Re: [REALEASE]Top Online Player

Thank's Gob Jog

plx screen!
 
Newbie Spellweaver
Joined
Nov 12, 2007
Messages
60
Reaction score
0
Re: [REALEASE]Top Online Player

ok thank's sorry i am noob^^^^
 
Experienced Elementalist
Loyal Member
Joined
Sep 18, 2007
Messages
252
Reaction score
1
Re: [REALEASE]Top Online Player

That' s a great Release dude.

How to write "hours" after the number of hours?

Sorry, dont know anything about PHP.
 
Joined
Jul 24, 2006
Messages
336
Reaction score
110
Re: [REALEASE]Top Online Player

madness, kamikaze u rule :) 10/10

great scipt, just show that some players on my server is ~ 800 hours online :rofl:

TheKamikaze - Top Online Player - RaGEZONE Forums
 
Last edited:
Newbie Spellweaver
Joined
Jan 27, 2007
Messages
34
Reaction score
1
Re: [REALEASE]Top Online Player

find <?=$online_time[6];?> and change it for :

<?=$online_time[6];?> Hours
 
Newbie Spellweaver
Joined
Nov 4, 2007
Messages
64
Reaction score
3
Re: [REALEASE]Top Online Player

nice 10/10
 
Newbie Spellweaver
Joined
Oct 20, 2006
Messages
19
Reaction score
1
Re: [REALEASE]Top Online Player

good thx^^
 
Newbie Spellweaver
Joined
Dec 4, 2007
Messages
28
Reaction score
0
Re: [REALEASE]Top Online Player

u can use this and for event :D exemple wtho player is number one to play this server at the 1.1.2009 won a gm or items :p
 
Newbie Spellweaver
Joined
Jan 27, 2007
Messages
34
Reaction score
1
Re: [REALEASE]Top Online Player

If someone have an idea for a script, just say it :)
 
Elite Diviner
Joined
Apr 29, 2006
Messages
420
Reaction score
0
Re: [REALEASE]Top Online Player

can you release webpage too?
thx for the script, very usefull
 
Elite Diviner
Joined
Apr 29, 2006
Messages
420
Reaction score
0
Re: [REALEASE]Top Online Player

yes, the muweb with this new template
 
Back
Top