Raised This Month: $ Target: $400
 0% 

Sockets & A2S


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
p3tsin
Senior Member
Join Date: Sep 2005
Location: Finland
Old 01-06-2006 , 10:42   Sockets & A2S
Reply With Quote #1

im all confused.. how do those a2s things work?
im trying to get A2S_INFO from a cs 1.6 server..

tried this, but it just says: "Lenght: 0, Text: ", which means that the server responds to me but why won't it send any data?
Code:
public send_request() {     new text[32]     setc(text,4, 0xff)     format(text[4],31, "TSource Engine Query")     setc(text[24],1, 0x00)     socket_send(socket, text,31)     set_task(0.5, "receive_info")     return PLUGIN_HANDLED } public receive_info() {     new recv[128]     while(socket_change(socket,1)) {         socket_recv(socket, recv,127)         client_print(0,print_chat, "Lenght: %d, Text: %s", strlen(recv), recv)     }     return PLUGIN_HANDLED }

if i replace the "TSource Engine Query" with "W" (which is the challenge request thingy) i get "Lenght: 6, Text: " (in spite of that recv[4] is "A", but thats it..)
__________________
plop
p3tsin is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:58.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode