Updated queries?!?
#1

Today I tryied to show the players of a server in a list with c#, but on 'c' and 'd' I'm receiving 0 data. This morning it was working, but it was showing only a half of the players. Are there new queries?
Reply
#2

I'm having a similar problem using a php script. It works fine on 0.3c servers, but will not return results at all from 0.3d servers.

The first url connects to a 0.3c server redirecting users to a new ip for an 0.3d server. As you can see, the 0.3c returns the information as requested. The 0.3d never completes its connection. To make sure the changed port wasn't causing a problem, I also tested on an 0.3d server with port 7777.
0.3c - http://www.thatonedude.net/sampteste....145&port=7777
0.3d - http://www.thatonedude.net/sampteste....125&port=7779

I've used the sample script from the Query Mechanism wiki page and changed it to take server ip & port from the url.
Код:
<?php
$sIPAddr = $_GET['ip'];                                                         // IP address of the server
$iPort = $_GET['port'];                                                                  // Server port.
$sPacket = "";                                                                  // Blank string for packet.
 
$aIPAddr = explode('.', $sIPAddr);                                              // Exploding the IP addr.
 
$sPacket .= "SAMP";                                                             // Telling the server it is a SA-MP packet.
 
$sPacket .= chr($aIPAddr[0]);                                                   //
$sPacket .= chr($aIPAddr[1]);                                                   //
$sPacket .= chr($aIPAddr[2]);                                                   //
$sPacket .= chr($aIPAddr[3]);                                                   // Sending off the server IP, 
 
$sPacket .= chr($iPort & 0xFF);                                                 //
$sPacket .= chr($iPort >> 8 & 0xFF);                                            // Sending off the server port.
 
$sPacket .= 'i';                                                                // The opcode that you want to send.
                                                                                // You can now send this to the server.
 
/**
 *    Let's connect now to the server.
 */
$rSocket = fsockopen('udp://'.$sIPAddr, $iPort, $iError, $sError, 2);           // Create an active socket.
fwrite($rSocket, $sPacket);                                                     // Send the packet to the server.
 
echo fread($rSocket, 2048);							// Get the output from the server
 
fclose($rSocket);
?>
Reply
#3

My particular problem appears to be resolved in R2. Hopefully, this is the case for the OP as well.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)