17.04.2011, 12:52
Quote:
I wrote a java query class some time ago. It offers all query functions, including sending rcon commands. I could release it if you like, however it is just written for the functionality, the code is quite dirty.
Edit: or check this https://sampforum.blast.hk/showthread.php?tid=104299 and convert it to java on your own, it isnt much work. |
Код:
$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';