Код за потвърждение: Избери целия код
#include <amxmodx>
#define LOG_CONNECTING
//#define LOG_DISCONNECTING
#define LOG_FILE "addons/amxmodx/logs/Connect.log"
public plugin_init()
register_plugin("Connect Logs", "1.0", "OciXCrom")
#if defined LOG_CONNECTING
public client_putinserver(id)
log_connection(id, true)
#endif
#if defined LOG_DISCONNECTING
public client_disconnect(id)
log_connection(id, false)
#endif
log_connection(const id, const bool:bConnect)
{
new szName[32], szAuthId[35], szIP[22]
get_user_name(id, szName, charsmax(szName))
get_user_authid(id, szAuthId, charsmax(szAuthId))
get_user_ip(id, szIP, charsmax(szIP))
log_to_file(LOG_FILE, "%s: %s [%s | %s]", bConnect ? "CONNECT" : "DISCONNECT", szName, szIP, szAuthId)
}