/*
*
* Name: id.sma
*
* Version: 1.0
*
* Purpose: S@ndel wants it.
*
* Usage: Logs name and ip address of each player who has connected to
* the server. amx_logging cvar turns it on/off (1 - on).
*
*/
#include <amxmodx>
new PLUGIN[]="id"
new AUTHOR[]="AlleY"
new VERSION[]="1.0"
public plugin_init()
{
// Register plugin
register_plugin(PLUGIN, VERSION, AUTHOR)
register_cvar("amx_logging", "1")
return PLUGIN_CONTINUE
}
public client_connect(id)
{
if(get_cvar_num("amx_logging") == 1)
{
new username[32]
new autohid[32]
new logline[192]
new filename[100]
new mapname[64]
get_mapname( mapname, 63 )
new CurrentTime[9]
get_time("%H:%M:%S",CurrentTime,8)
get_time("addons/amxmodx/playerid.log", filename, 99)
get_user_name(id, username, 31)
get_user_authid(id, autohid, 31)
format(logline, 191, "%s - %s", username, autohid, CurrentTime, mapname)
log_to_file(filename, logline)
}
return PLUGIN_HANDLED
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1038\\ f0\\ fs16 \n\\ par }
*/