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

Advenced server status

arheon

Own3d PlAx.'?
Joined
Aug 31, 2009
Messages
92
Reaction score
3
Hey guys , i got a lil problem. :(
I wanted to make server status that is gonna show total number of players and also will show how much theres male and female players.
I use Dynamic status by patxon to show how much players is online at that moment and i wanted to edit it somehow to show accounts and players but i failed :D.
Here is some ss how should it look.
lolfkz.png


It would be great if someone could help , it will be really usefull on my ot :wub:
 
Replace players.php with
PHP:
<?php
if(isset($_POST['action'])){
    $dbhost = 'localhost';
    $dblogin = 'root';
    $dbpass = 'password';
    $dbname = 'database name';
    mysql_connect($dbhost, $dblogin, $dbpass);
    mysql_select_db($dbname);
    $sql = mysql_query("SELECT `id` FROM `players` WHERE `online` = '1'");
    $total = mysql_num_rows($sql);
    $sql = mysql_query("SELECT `id` FROM `players` WHERE `sex` = '1' AND `online` = '1'");
    $male = mysql_num_rows($sql);
    $female = $total - $male;
    echo $total.'(Male: '.$male.' / Female: '.$female.')';
}
else {
    echo "Error";
}
?>

You can modify it as you wish.
 
Back
Top