#include <amxmodx>
#include <amxmisc>
#define PLUGIN "New Plugin"
#define AUTHOR "Unknown"
#define VERSION "1.0"
new g_ban_player[33];
new g_menuSettings[33]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("amx_banreason", "CmdBanReason", ADMIN_BAN, "<reason>");
}
public CmdBanReason(id)
{
new player = g_ban_player[id];
if( !player )
return PLUGIN_HANDLED;
new name[32], name2[32], authid[32], authid2[32], ip[36]
get_user_ip(player, ip, 36, 0);
new reason[128];
read_args(reason, sizeof(reason) - 1);
remove_quotes(reason);
new CurrentTime[9], hostname[64]
get_user_name(player, name2, 31)
get_user_authid(id, authid, 31)
get_user_authid(player, authid2, 31)
get_user_name(id, name, 31)
new userid2 = get_user_userid(player)
get_cvar_string("hostname",hostname,63)
if (equal("STEAM_0:", authid2, 8))
{
client_print(id, print_chat, "Szerver: %s^n Admin neve: %s^n Neved: %s^n Steam: %s^nIdö:%s^n", hostname, name, name2, authid2, CurrentTime)
client_cmd(player, "wait;wait;snapshot;wait;snapshot");
}
else
{
client_print(id, print_chat, "Szerver: %s^n Admin neve: %s^n Neved: %s^n IP: %s^n Idö:%s^n", hostname, name, name2, ip, CurrentTime )
client_cmd(player, "wait;wait;snapshot;wait;snapshot");
}
if ( equal("STEAM_0:", authid2, 8))
{
client_cmd(id, "amx_banip #%i %i ^"%s^"", userid2, g_menuSettings[id], reason);
}
else
{
client_cmd(id, "amx_ban #%i %i ^"%s^"", userid2, g_menuSettings[id], reason);
}
server_exec()
g_ban_player[id] = 0;
return PLUGIN_CONTINUE;
}