17.04.2011, 21:48
All lines expcept the last one are for the packet header, it contains the server ip and port. All saved as bytes, not as string.
The last line is the real query. the first letter of the last line always signalizes the type of the query. 'p' is for pings, 'i' is a serverinfo request. 'x' would be an RCON command.
I figured out most of it myself before I took a look at other codes or even knew there is a wiki page that explains it all in detail
https://sampwiki.blast.hk/wiki/Query
Fell free to ask if you got further questions, or dont understand something in the article.
The most difficult part of it is all the byte-operation in my opinion, had not worked with it like this before
The last line is the real query. the first letter of the last line always signalizes the type of the query. 'p' is for pings, 'i' is a serverinfo request. 'x' would be an RCON command.
I figured out most of it myself before I took a look at other codes or even knew there is a wiki page that explains it all in detail

https://sampwiki.blast.hk/wiki/Query
Fell free to ask if you got further questions, or dont understand something in the article.
The most difficult part of it is all the byte-operation in my opinion, had not worked with it like this before
