#include <amxmodx>
#include <amxmisc>
new g_Forward;
public plugin_init()
{
register_concmd("fb_ban", "cmd_fbban");
register_concmd("amx_ban", "cmd_fbban");
g_Forward = CreateMultiForward("fbans_player_banned_pre", ET_STOP, FP_CELL, FP_CELL);
}
public cmd_fbban(id)
{
// тут надо проверочки на доступ только намутить :D
//
// fb_ban <time in mins> <#userid> <reason>
// amx_ban <time in mins> <steamID or nickname or #authid or IP> <reason>
new szTime[10], szTarget[32], szReason[64];
read_argv(1, szTime, charsmax(szTime));
read_argv(2, szTarget, charsmax(szTarget));
read_argv(3, szReason, charsmax(szReason));
new p_index = cmd_target(id, szTarget);
if(is_user_connected(p_index))
{
new ret;
ExecuteForward(g_Forward, ret, id, get_user_userid(p_index));
return ret;
}
return PLUGIN_CONTINUE;
}