Why not give complete information ( SteamID: XX | IP: XX )
HTML Code:
L 16:15:31: ** Name: <Warrior>
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <geoip>
new const szLogDir[] = "addons/amxmodx/logs/ConnectLogger"
public plugin_init()
{
if(!dir_exists(szLogDir)) mkdir(szLogDir)
}
public client_putinserver(id)
{
if(!is_user_bot(id) && is_user_connected(id))
set_task(2.0,"Save",id)
}
public Save(id)
{
new name[32]
get_user_name(id, name, charsmax(name))
new authid[32]
get_user_authid(id, authid, 31)
new ip[32]
get_user_ip(id, ip, 31)
new logfile[50];
new text[charsmax(name)]
static datestr[11]
get_time("%Y-%m-%d", datestr, 10)
new timestr[9]
get_time("%H:%M:%S", timestr, 8)
formatex(logfile, charsmax(logfile), "%s/%s", szLogDir, datestr)
formatex(text, charsmax(text), "L %s: ** Name: %s | SteamID: %s | IP: %s **", timestr, name, authid, ip)
write_file(logfile, text)
}