RevCMS - Plus Emulator Players Online not working right

Blasteh

Lord Farquaad
Apr 3, 2013
1,151
513
Hello DB,
Recently, I've been trying to get this to work (With the help of @Kods).

Since Plus Emulator doesn't update server_status, it wont display online players via server_status, so we had to use a different methotd. However, if 0 players are online, it turns blank.

And yet another issue, when using the code at the bottom, it only reads the first player online.
So if they're are 5 players in the hotel, it still says 1 player online. It doesn't read how many players are online.
(Image below)

You must be registered for see images attach


The class.core function is the following.

Code:
    final public function getOnline()
    {
        global $engine;
        return $engine->result("SELECT online FROM users WHERE `online`='1'");
    }
 
Last edited:

JayC

Always Learning
Aug 8, 2013
5,494
1,398
Hello DB,
Recently, I've been trying to get this to work (With the help of @Kods).

Since Plus Emulator doesn't update server_status, it wont display online players via server_status, so we had to use a different methotd. However, if 0 players are online, it turns blank.

And yet another issue, when using the code at the bottom, it only reads the first player online.
So if they're are 5 players in the hotel, it still says 1 player online. It doesn't read how many players are online.
(Image below)

You must be registered for see images attach


The class.core function is the following.

Code:
    final public function getOnline()
    {
        global $engine;
        return $engine->result("SELECT online FROM users WHERE `online`='1'");
    }
lol do you know what that statement is doing? You are selecting "online" you need to be selecting Count(*) because you want the number of rows that have that many users online.

Code:
return $engine->result("SELECT Count(*) FROM users WHERE `online`='1'");
 

Users who are viewing this thread

Top