Sorry, the flags was my bad. For the ping issue, it isn't showing because the user is still connecting to the server when it checks for the ping thus it shows as 0. To fix this I added a delay before it logs.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Log Connections"
#define VERSION "0.3"
#define AUTHOR "MysticDeath.com"
#define LOGTASK 84516
public plugin_init()
register_plugin(PLUGIN, VERSION, AUTHOR)
public client_authorized(id) { // calls when client connects to server and server obtains their steam id
if (is_user_admin(id) || is_user_bot(id))
return
set_task(30.0, "logstuff", id+LOGTASK)
}
public client_disconnect(id)
if (task_exists(id+LOGTASK))
remove_task(id+LOGTASK)
public logstuff(task_id) {
new id = task_id-LOGTASK
if (!is_user_connected(id))
return
new szName[36], szAuthid[36], szIP[36], sFlags[36], Flags = get_user_flags(id), Ping, Loss
get_user_name(id, szName, 35) // gets connecting players name
get_user_authid(id, szAuthid, 35) // steam id..
get_user_ip(id, szIP, 35) // ip...
get_flags(Flags, sFlags, 35) // flags..
get_user_ping(id, Ping, Loss) // ping...
log_amx("Connected: ^"%s<%d><%s><>^" (access ^"%s^") (address ^"%s^") (ping ^"%i^") (loss ^"%i^")", szName, get_user_userid(id), szAuthid, sFlags, szIP, Ping, Loss) // logs to log file that player has connected
}
__________________