Playerlist
#6

All you need is:
Код:
<?php

$aPlayers = $query->getDetailedPlayers();

if(!is_array($aPlayers) || count($aPlayers) == 0)
{
echo '<br /><i>None</i>';
}
else
{
?>
<table width="400">
<tr>
<td><b>Player ID</b></td>
<td><b>Nickname</b></td>
<td><b>Score</b></td>
<td><b>Ping</b></td>
</tr>
<?php
foreach($aPlayers as $sValue)
{
?>
<tr>
<td><?= $sValue['playerid'] ?></td>
<td><?= htmlentities($sValue['nickname']) ?></td>
<td><?= $sValue['score'] ?></td>
<td><?= $sValue['ping'] ?></td>
</tr>
<?php
}

echo '</table>';
}
}
?>
and http://files.typefish.co.uk/sa-mp/SampQueryAPI.php

+ fsockopen() has to be enabled - contact your host and ask them to enable it.
Reply


Messages In This Thread
Playerlist - by rapidhost - 27.11.2011, 12:31
Re: Playerlist - by ca2k - 27.11.2011, 12:34
Re: Playerlist - by rapidhost - 27.11.2011, 12:40
Re: Playerlist - by rapidhost - 27.11.2011, 12:46
Re: Playerlist - by rapidhost - 27.11.2011, 12:53
Re: Playerlist - by ca2k - 27.11.2011, 13:24

Forum Jump:


Users browsing this thread: 1 Guest(s)