Hi all.
This has to be the ulitmate noob question. I have a little php script that I have been trying to modify but not luck.
From the beginning. I have a game server on my linux box and a webserver. On the webserver is a page where I want to display number of players on the server. So in theory it should work like this :
if pleyers > 0 then
print statment in white 1 ( if there is someone on the server )
else
print statment in gray 2 ( if the server is empty )
Here is the code :
[code=php]if ($server->server_num_players > 0 )
{
echo ‘<font color=”#FFFFFF”>’.”Current Map: “.$server->server_map.”<br>”;
echo ‘<font color=”#FFFFFF”>’.”Players: “.$server->server_num_players;
echo ‘<font color=”#FFFFFF”>’.” of “.$server->server_num_players_max;
}
else
{
echo ‘<font color=”#808080”>’.”Current Map: “.$server->server_map.”<br>”;
echo ‘<font color=”#808080″>’.”Players: “.$server->server_num_players;
echo ‘<font color=”#808080″>’.” of “.$server->server_num_players_max;
}
The number of players are displayed correctly but the font color is always gray no matter if the server is empty or not.
Thanks for your time