20.08.2014, 20:28
i mean where i put these files?
Returns an empty statement for some reason.
http://instantgaming.net/ Код:
Live Server Status General Information Hostname Gamemode Players / Map Weather Time Version Password Online Players Player ID Nickname Score |
How can I show only first 5 players online from server?
*Sorry for bump. |
<?php
require "SampQueryAPI.php";
$query = new SampQueryAPI('127.0.0.1', '7777');
if($query->isOnline())
{
$players = $query->getDetailedPlayers();
if(!is_array($players) || count($players) == 0)
{
echo 'No players on :*(';
}
else
{
echo "PLayer list:<br>";
$count = 1;
foreach($players as $value)
{
if($count == 6)break;
echo $count.". ". htmlentities($value['nickname']) . " <br>";
$count++;
}
}
}
else echo "Server offline!!";
?>
Notice: fwrite(): send of 15 bytes failed with errno=1 Operation not permitted in /public_html/includes/SampQueryAPI.php on line 61
iam checking if its offline arn't and its checking successfully and it says that its ofline becuse iam checking for a offline ip becuase i haven't server yet (my server gonna) so i have tried BT 3.7 Server's ip for test and it didn't work too
|
Notice: fwrite(): send of 15 bytes failed with errno=1 Operation not permitted in /public_html/includes/SampQueryAPI.php on line 61 Notice: Undefined variable: aDetails in /public_html/includes/SampQueryAPI.php on line 293
thnx guys all my proplems has been fixed and a big thanks to @DRIFT_HUNTER for helping me but i have last one proplem and its it detects Language as mapname such as 'Map: English' not 'Map: Everything' would be great if someone told me how to fix this prop please
|
<?php
require "SampQueryAPI.php";
$query = new SampQueryAPI('localhost', '7777');
$aServerRules = $query->getRules();
echo $aServerRules['mapname'];
?>
<script language='JavaScript' src='http://monitoring.ru/mon/info.php?&ip=IP&port=PORT&info=map'> |