Sign in to follow this  
Followers 0
yucatan

Query server Counter Strike Source. udpsend

5 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



Do you read this ? Posted Image

1 person likes this

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

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

Are you sure Valik'll be in your opinion ?


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

I'm not sure how "DO NOT DISCUSS GAME AUTOMATION HERE" is ambiguous, but okay. Thread locked.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0