08.12.2011, 18:51
All you need is:
and http://files.typefish.co.uk/sa-mp/SampQueryAPI.php
+ fsockopen() has to be enabled - contact your host and ask them to enable it.
Code:
<?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>'; } } ?>
+ fsockopen() has to be enabled - contact your host and ask them to enable it.