Ok, so I'm trying to make a plugin that, when a client joins your server, it gets his steamid, name, and ip, and writes it to a file. When I join the server, nothing gets written to the file.
Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "AutoSteamID and IP Log"
#define VERSION "1.0"
#define AUTHOR "H3avY Ra1n"
public plugin_init() {
//Register Plugin
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public client_putinserver(id)
{
new authid[32]
new name[32]
new ip[32]
get_user_authid(id, authid, 31)
get_user_ip(id, ip, 31)
new fp = fopen("addons/amxmodx/configs/logging.txt", "wt")
get_user_name(id, name, 31)
trim(authid)
trim(ip)
trim(name)
fprintf(fp, "%s-%s-%s-%s", name, authid,ip)
fclose(fp)
}