Refer to the topic about Socket
http://forums.alliedmods.net/showthread.php?t=104958
What messages are the
"%c%c%c%c%s" &
"%c%c%c%c%c%s%c"
Code:
public SendRequest( ) {
new szOldRequest[ 12 ], szNewRequest[ 26 ], i;
format( szOldRequest, 11, "%c%c%c%c%s", 255, 255, 255, 255, "details" );
format( szNewRequest, 25, "%c%c%c%c%c%s%c", 255, 255, 255, 255, 84, "Source Engine Query", 0 );
// Clear infos
g_bServerAlive = false;
g_bIsWindows = false;
g_strReturn[ HOSTNAME ][ 0 ] = '^0';
g_strReturn[ MAP ][ 0 ] = '^0';
g_intReturn[ BOTS ] = 0;
g_intReturn[ PLAYERS ] = 0;
g_intReturn[ MAX_PLAYERS ] = 0;
// Send sockets
for( i = -1; i < 4; i++ )
socket_send2( g_iSocket, szOldRequest, 11 );
for( i = -1; i < 4; i++ )
socket_send2( g_iSocket, szNewRequest, 25 );
set_task( 0.1, "ReceiveInfo", TASK, _, _, "b" );
return PLUGIN_CONTINUE;
}
Sorry for my poor English