Advertisement
Thijn

Untitled

Nov 24th, 2011
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.09 KB | None | 0 0
  1. <?php
  2. $q = new LUQuery("IP_HERE",PORT);
  3. if ($q->IsAlive()) { //Check if server is online
  4. $data = $q->GetInfo(); //Query the server and storing the info into an variable
  5.  
  6. $data returns: (example)
  7.  
  8.  
  9. Array
  10. (
  11.     [GameID] => 1
  12.     [ServerName] => GTA.ru Freeroam LU Server
  13.     [ServerMode] => Deathmatch
  14.     [ServerPlayers] => 1
  15.     [ServerMaxPlayers] => 64
  16.     [Player] => Array
  17.         (
  18.             [1] => Array
  19.                 (
  20.                     [ExtraFlags] => 61
  21.                     [ID] => 6
  22.                     [Nick] => vit47
  23.                     [Team] => 0
  24.                     [Score] => 1
  25.                     [Kills] => 0
  26.                     [Deaths] => 0
  27.                     [Ping] => 79
  28.                     [Pos] => Array
  29.                         (
  30.                             [X] => 286.87033081055
  31.                             [Y] => -1107.2081298828
  32.                             [Z] => 25.539543151855
  33.                         )
  34.  
  35.                     [Health] => 98
  36.                     [Armour] => 0
  37.                     [Skin] => 0
  38.                 )
  39.         )
  40.  
  41. )
  42.  
  43.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement