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

who is online error

The extros

New Member
Joined
Jun 28, 2010
Messages
98
Reaction score
1
Hello, I made this thread because my who is online? page is not working, I know that it is not located in system/pages as a php file... But where is it located and how can i solve the next problem
On the server status in the right corner says that there are 50 players online but in the whoisonline it shows 130 players and many of them are not online now in the game but it shows that they are... It doesnt update every x time..

P.D= I use Modern AA
 
Tell me if this solves your problem:

1) Go to your Modern AAC folder/API
2) Make a backup of the files "getPlayersOnline.php" and "getPlayersOnlineAmount.php"
3) Open "getPlayersOnline.php" (The original one, not the backup), erase all inside and paste this:
Code:
<?php
require("system/system.php");
auth();
$db = new database();
$return = array();
$sql = $db->query("SELECT `name`, `level`, `world_id`, `sex`, `vocation` FROM `players` WHERE `online` = '1'");
	while($cmd = $sql->fetch_array()) {
		$return[] = $cmd;
	}
echo json_encode($return);
4) Open "getPlayersOnlineAmount.php" (The original one, not the backup), erase all inside and paste this:
Code:
<?php
require("system/system.php");
auth();
$db = new database();
$return = array();
$sql = $db->query("SELECT count(1) FROM `players` WHERE `online` = '1'")->fetch_array();
echo $sql[0];
5) See if that works (Maybe you'll need to reboot your pc, or you can try stopping Apache and MySQL services, and restarting them)
 
Back
Top