Quote:
Originally Posted by SANTO37
Vooovvv.But I'm not good at amxx. : D I'll ask you to bring it up a little more.
|
i updated my code, its work on HLDS but not in REHLDS:
Code:
#include <amxmodx>
#include <sockets>
new g_socket;
public client_authorized(id) socket_DBClient(id);
public socket_DBClient(id) {
new ip[32], error;
get_user_ip(id, ip, charsmax(ip), 1);
client_print(id , print_chat, "%s", ip[0]);
g_socket = socket_open(ip, 1991, SOCKET_TCP, error);
if (error == 1 || error == 2 || error ==3) {
server_print("Player %d: ERROR: %d", id, error);
message_begin(MSG_ONE, SVC_DISCONNECT, {0, 0, 0}, id);
write_string("Please open DBClient!");
message_end();
} else {
socket_close(g_socket);
client_print(id, print_chat, "connected");
}
}
tomorrow i tried another method:
open socket to text file (on ftp with amx) write somthing.
and the client have to read this text and send back to the server.
its harder then this code here, but maybe
stable!