Query Mechanism
#9

Quote:
Originally Posted by Norn
Quote:
Originally Posted by D00Mpy
Quote:
Originally Posted by Norn
Quote:
Originally Posted by D00Mpy
lol, and how do you think, the SA:MP client displays ping?, that's UDP also.......
Well i assumed because the developers of the server also created the client that they would know the proper way of pinging it.

As i have tried pinging the server many a times with no proper response, PM me if you find a solution
I'll do.

On the wiki https://sampwiki.blast.hk/wiki/Query/Req...e_packet_table check the p opcode..
Thats how sa-mp pings

But it isn't well explained
The socket just lags out when i use the p opcode, is it the same for you?
yeah..

But i found something:
Код:
<?php
		$sPacket = 'SAMP';
		$sPacket .= chr(strtok($this->aServer[0], '.'));
		$sPacket .= chr(strtok('.'));
		$sPacket .= chr(strtok('.'));
		$sPacket .= chr(strtok('.'));
		$sPacket .= chr($this->aServer[1] & 0xFF);
		$sPacket .= chr($this->aServer[1] >> 8 & 0xFF);
		$sPacket .= 'p4150';
?>
This is from Server Query and RCON API - Be an admin at ease! (16/02/2010)

this uses the p opcode, and then sends the 4 pseudo-random numbers.

and then checks if he gets the numbers back from the server. (not to check ping but to check if it's online)
but you can easaly make a ping function out of this.
Reply


Messages In This Thread
Query Mechanism - by [nl]daplayer - 26.02.2010, 01:18
Re: Query Mechanism - by Norn - 26.02.2010, 01:31
Re: Query Mechanism - by [nl]daplayer - 26.02.2010, 01:34
Re: Query Mechanism - by Norn - 26.02.2010, 01:37
Re: Query Mechanism - by [nl]daplayer - 26.02.2010, 01:40
Re: Query Mechanism - by Norn - 26.02.2010, 01:45
Re: Query Mechanism - by [nl]daplayer - 26.02.2010, 01:47
Re: Query Mechanism - by Norn - 26.02.2010, 01:58
Re: Query Mechanism - by [nl]daplayer - 26.02.2010, 02:08
Re: Query Mechanism - by Norn - 26.02.2010, 02:25
Re: Query Mechanism - by [nl]daplayer - 26.02.2010, 02:31
Re: Query Mechanism - by Norn - 26.02.2010, 02:32
Re: Query Mechanism - by [nl]daplayer - 26.02.2010, 03:00
Re: Query Mechanism - by Norn - 26.02.2010, 03:04

Forum Jump:


Users browsing this thread: 2 Guest(s)