• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

player online/server OFFLINE!?

nuelma123

New Member
Joined
Jun 6, 2011
Messages
66
Reaction score
1
how i can change this state? when server is off , i want that
placemessage (server off)

1x6HOTJ.png


LAYOUT

Code:
         <?PHP
       
            if($config['status']['serverStatus_online'] >= 0)
                    echo ''.$number_of_players_online.'<br/>Players Online';
            else
                echo '<font color="red"><b>Server<br />OFFLINE</b></font>';
          ?></div>
        </div>
 
Code:
<?PHP

if($config['status']['serverStatus_online'] >= 0)
echo ''.$number_of_players_online.'<br/>Players Online';
else
echo '<font color="red"><b>Server<br />OFFLINE</b></font>';
</div>
</div>
 
You're hosting your server on your home computer which has closed ports I guess? If yes, that can be the reason, but not sure.
 
This
Code:
if($config['status']['serverStatus_online'] >= 0)

To
Code:
if($config['status']['serverStatus_online'] > 0)

Or
Code:
if($config['status']['serverStatus_online'] == 1)
 
If you had your server offline, it takes a bit to change the status to online.
Also you can edit statusTimeout in config.lua
 
can you do a var dump of "$config['status']['serverStatus_online']"
PHP:
var_dump($config['status']['serverStatus_online']);

give us one when the server is on and one where the server is off.

so we can make an accurate if else statement.

as this one just seems odd.
 
Back
Top