Jump to content

Query server Counter Strike Source. udpsend


Recommended Posts

Hello guys.

I'm trying to send a information query from autoit to a counter strike source server and request some basic information howmany players are connected etc

this is my code until now.

#include <Array.au3>
UDPStartup()
OnAutoItExitRegister("Cleanup")
$socket = UDPOpen("84.27.55.62", 27015)
If @error <> 0 Then Exit
$buffer = StringToBinary("TSource Engine Query\0")
$status = UDPSend($socket, $buffer)
ConsoleWrite($socket[1] & @CRLF)
$teller = "0"
While 1
    $teller +=1
    if $teller = 300 then exit
    $data = UDPRecv($socket, 9999)
    If $data <> "" then Exit
    sleep(100)
WEnd
Func Cleanup()
    UDPCloseSocket($socket)
    UDPShutdown()
EndFunc

here is discribed how the UDP package should be build i'm pretty sure i'm doing something wrong.

http://developer.valvesoftware.com/wiki/Server_Queries

Here is a php version script that i tested and works.

http://diktaturen.net/sqs/php-serverquery11.zip

i dont know why but for some reason it just dont work.

there is a counter strike server active on 84.27.55.62:27015

u can use that ip to test.

this is the function we are trying to build : A2S_INFO

Basic information about the server.

Thanks.

Greetz Yucatan

Edited by yucatan
Link to comment
Share on other sites

Do you read this ? Posted Image

But he's not automating the client. He's only asking servers for information. Similar to website queries ... or gamespy ... or xfire.

Try reading TFA

Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...