Not sure exactly you want for xx.xx.xx - xx.xx.xx, is that the start and end time?
Try this...let me know if it works, untested.
Code:
#include <amxmodx>
#define PLUGIN "Admin T Logger"
#define VERSION "1.0"
#define AUTHOR "Dimanok"
new g_szTimeIN[32][9];
new g_szTimeOut[32][9];
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
}
public client_disconnect(id)
{
log_event(id);
//Reset the time in & out.
g_szTimeOut[id][0] = 0;
g_szTimeIN[id][0] = 0;
return PLUGIN_HANDLED
}
public client_putinserver(id)
{
//(Get the current time)
get_time("%H:%M:%S",g_szTimeIN[id],8);
return PLUGIN_HANDLED
}
public log_event(id)
{
//(Create all the new vars)
new szName[32], iFlags, szSteamID[32], szIP[32];
//(Get the users IP)
get_user_ip(id,szIP,sizeof(szIP));
//(Get the users name)
get_user_name(id, szName, charsmax(szName));
//(Get the users steamid)
get_user_authid(id,szSteamID,sizeof(szSteamID));
//(Get the users flags)
iFlags = get_user_flags(id);
//(IF iFlags contain ADMIN_LEVEL_H?)
if( (iFlags & ADMIN_LEVEL_H) )
{
get_time("%H:%M:%S",g_szTimeOut[id],8);
new szText[128];
//(Format the String) "[Time] [Name] [SteamID] [IP Address]"
format(szText,sizeof(szText),"(%s)-(%s) ---- Name:[%s] SteamID:[%s] IP:[%s]",g_szTimeIN[id],g_szTimeOut[id],szName,szSteamID,szIP);
//Write it to the log
log_to_file ("admin_activity.log",szText);
}
return PLUGIN_HANDLED;
}
__________________