CS hjælp igen :D

Tags:    delphi

Hej er der nogel der kan hjælpe mig med følgende og jeg vil helst bruge UDP componenten fra indy pakken altså IdUDPClient:

Her er så det jeg skal bruge hjæp til:

Half-life: rCon
Game servers will answer the following messages:
Messages are sent to the server by sending 4 consecutive bytes of 255 (32-bit integer -1) and then the string command followed by a zero byte to terminate it.

Replies from the server contain the following information. The different parts of information are separated by a zero byte, eg: -1 -1 -1 -1 (net address) 0 (name of the host) 0 ... 0... 0 ...

"ping"
Server responds with a single byte code ASCII 'j'

"info"
Server responds with the following packet:
(int32) -1
(byte) ASCII 'C' (info response, S2A_INFO)
(string) net address of server
(string) name of the host / server
(string) name of the map
(string) game directory (i.e. valve/)
(string) Game description (e.g. "half-life multiplay")
(byte) active client count
(byte) maximum clients allowed
(byte) protocol version (currently 7)

"players"
Server responds with the following packet:
(int32) -1
(byte) ASCII 'D' (players response, S2A_PLAYER)
(byte) active client count

for each active client
(byte) client number / index
(string) player name
(int32) client's frag total
(float32) client's total time in-game

"rules"
Server responds with the following packet:
(int32) -1
(byte) ASCII 'E' (rules response, S2A_RULES)
(int16) number of rules

for each rule
(string) rule name
(string) rule value


-------------------

Master server query protocol:

Sent to master:

(byte) ASCII 'c' ( A2M_GET_SERVERS )

Response from master:

(int32) -1
(byte) ASCII 'd' ( M2A_SERVERS )
(byte) unused

// This is followed by as many 6 byte ip addresses as will fit in the message. The master currently feeds about 2K worth of IP address ( 300+ or so ), but we may up that # significantly in the near future.

(4 x byte) ip address
(int16) port #



The old protocol is still valid, but there is a new, extended protocol:

Here are both the old and new protocols ( the new one is the "details" message ):

"info"
Server responds with the following packet:
(int32) -1
(byte) ASCII 'C' (info response, S2A_INFO)
(string) net address of server
(string) name of the host / server
(string) name of the map
(string) game directory (i.e. valve/)
(string) Game description (e.g. "half-life multiplay")
(byte) active client count
(byte) maximum clients allowed
(byte) protocol version (currently 37)

"details"
(int32) -1
(byte) ASCII 'm' ( S2A_INFO_DETAILED )
(string) net address of server
(string) name of the host / server
(string) name of the map
(string) game directory (i.e. valve/)
(string) Game description (e.g. "half-life multiplay")
(byte) active client count
(byte) maximum clients allowed
(byte) protocol version (currently 37)
(byte) type of server == 'l' for listen or 'd' for dedicated
(byte) os of server == 'w' for win32 or 'l' for linux
(byte) password on server == 1 or yes, 0, for no
(byte) is server running a mod? == 1 for yes, 0 for no

IFF the server is running mod byte was 1:

(string) URL for mod's "info" website
(string) URL for mod's download ftp server
(int32) mod version #
(int32) mod download size ( in bytes, approx. )
(byte) is the mod a server side only mod? 1 == yes, 0 == no
(byte) does this server require you to have a custom client side .dll ( client.dll )? 1 == yes, 0 == no.



MVH. Th3 0n3



5 svar postet i denne tråd vises herunder
0 indlæg har modtaget i alt 0 karma
Sorter efter stemmer Sorter efter dato
Hej jeg har en lille stump kode her

Fold kodeboks ind/udKode 


Det svar jeg får tilbage er "j" men jeg vil meget genre vide pingen ok ikke et "j" :D er der nogle der kan hjælpe her???

MVH. Th3 0n3



User
Bruger #645 @ 24.06.03 15:27
Det vil jeg gerne lave om på jeg vil gerne vide hvordan man skaffer oplyningerne fra server om hvem der spilelr og sådan



Det vil jeg gerne lave om på jeg vil gerne vide hvordan man skaffer oplyningerne fra server om hvem der spilelr og sådan


Yepper



Det vil jeg gerne lave om på jeg vil gerne vide hvordan man skaffer oplyningerne fra server om hvem der spilelr og sådan

Yepper

Indy pakkens UDP socket er altså ikke bedre end den anden imo...
-
WWW: http://neuros.h4f.dk
email: neuroman@ebvum.dk



Er der ikke nogel der kan hjælpe mig med at Replace en Hex byte jeg har en ide men den virker ikke det den skal er at fjenre Hex byten 00

Fold kodeboks ind/udKode 


Men det virker ikke



t