RU
RU
UA
EN
PL
ГЛАВНАЯ
УСЛУГИ
ПЛАГИНЫ
КАРТЫ
REBUY
SCANMON
CASSA
SALE
ФОРУМ
МОНИТОР
HELP
КОНТАКТ
Главная
/
Plugins
/
Amx Unbanmenu
Amx Unbanmenu
Теги:
Скачать плагины cs
Админские
Плагин добавляет меню для разбана
Компилятор: 1.8.2
656
Команды:
amx_unbanmenu
можно забиндить например:
bind "клавиша" "amx_unbanmenu"
.sma / .sp
/* Plugin generated by AMXX-Studio */ #include
#include
new g_menuPosition[33] new g_menuSelect[33][64] new g_menuUnBanType[33] new g_menuUnBanLine[33][2] new g_menuUnBanText[33][8][32] new g_bannedCfgFile[2][] = {"banned.cfg","listip.cfg"} new g_coloredMenus public plugin_init() { register_plugin("UnBanmenu", "1", "AMX Team") register_clcmd("amx_unbanmenu","cmdUnBanMenu", ADMIN_BAN, "- displays unban menu") register_menucmd(register_menuid("UnBan STEAMID or IP?"),(1<<0|1<<1|1<<9),"actionUnBanMenuType") register_menucmd(register_menuid("UnBan Menu"),1023,"actionUnBanMenu") g_coloredMenus = colored_menus() } public actionUnBanMenu(id,key) { switch(key) { case 8: { displayUnBanMenu(id, ++g_menuPosition[id]) } case 9: { g_menuUnBanLine[id][0] = g_menuUnBanLine[id][0] - (8 + g_menuUnBanLine[id][1]) if(g_menuUnBanLine[id][0] < 0) g_menuUnBanLine[id][0] = 0 displayUnBanMenu(id, --g_menuPosition[id]) } default: { new name[32], authid[32], ipaddress[24] get_user_authid(id, authid, 31) get_user_name(id, name, 31) get_user_ip(id, ipaddress, 23, 1) log_amx("UnBan: ^"%s<%d><%s><%s>^" unban ^"%s^"", name,get_user_userid(id),authid,ipaddress,g_menuUnBanText[id][key]) switch (get_cvar_num("amx_show_activity")) { case 2: client_print(0, print_chat, "ADMIN %s: unban %s", name, g_menuUnBanText[id][key]) case 1: client_print(0, print_chat, "ADMIN: unban %s", g_menuUnBanText[id][key]) } if(g_menuUnBanType[id] == 1) { server_cmd("removeip ^"%s^"; writeip", g_menuUnBanText[id][key]) server_exec() console_print(id, "IP ^"%s^" removed from ban list", g_menuUnBanText[id][key]) } else { server_cmd("removeid %s; writeid", g_menuUnBanText[id][key]) console_print(id, "Authid ^"%s^" removed from ban list", g_menuUnBanText[id][key]) } g_menuUnBanLine[id][0] = g_menuUnBanLine[id][1] = 0 displayUnBanMenu(id, g_menuPosition[id] = 0) } } return PLUGIN_HANDLED } checkSTEAMID(steamid[]) { new len = strlen(steamid) if(len > 10 && equali(steamid, "STEAM_", 6) && steamid[7] == ':' && steamid[9] == ':' && str_to_num(steamid[10])) { return 1 } return 0 } checkIP(ip[]) { new len = strlen(ip) new dots = 0, i = 0 while(isdigit(ip[i]) || ip[i]=='.') if(ip[i++] == '.') ++dots if(i == len && dots == 3) { return 1 } return 0 } displayUnBanMenu(id,pos) { if(pos < 0) return new menuBody[512] new b = 0 new len = format(menuBody, 511, g_coloredMenus ? "\yUnBan Menu\R%d^n\w^n" : "UnBan Menu %d^n^n", id, "UNBAN_MENU", pos + 1) new keys = (1<<9) new textlen, line new type = g_menuUnBanType[id] new temp[32], banTime[32], disable if(file_exists(g_bannedCfgFile[type])) { line = g_menuUnBanLine[id][0] while((line = read_file(g_bannedCfgFile[type], line, g_menuSelect[id], 63, textlen))) { temp[0] = '^0' banTime[0] = '^0' g_menuUnBanText[id][b][0] = '^0' disable = 0 if(textlen < 9) disable = 1 else if(parse(g_menuSelect[id], temp, 31, banTime, 31, g_menuUnBanText[id][b], 31) != 3) disable = 1 else if((type == 1 && !checkIP(g_menuUnBanText[id][b])) || (type == 0 && !checkSTEAMID(g_menuUnBanText[id][b]))) disable = 1 if(disable == 0) { keys |= (1<
0) { format(menuBody[len], 511-len, "^n9. More...^n0. %s",id, pos ? "Back" : "Exit",id) keys |= (1<<8) } else format(menuBody[len], 511-len, "^n0. %s", pos ? "Back" : "Exit",id) g_menuUnBanLine[id][1] = line - g_menuUnBanLine[id][0] g_menuUnBanLine[id][0] = line show_menu(id, keys, menuBody, -1, "UnBan Menu") } return } public actionUnBanMenuType(id,key) { switch(key) { case 9: return PLUGIN_HANDLED default: { g_menuUnBanType[id] = key // 0 = STEAMID, 1 = IP g_menuUnBanLine[id][0] = g_menuUnBanLine[id][1] = 0 displayUnBanMenu(id, g_menuPosition[id] = 0) } } return PLUGIN_HANDLED } displayUnBanMenuType(id) { new menuBody[512] new len = format(menuBody, 511, g_coloredMenus ? "\yUnBan STEAMID or IP?^n\w^n" :"UnBan STEAMID or IP?^n^n",id) new keys = (1<<0)|(1<<1)|(1<<9) len += format(menuBody[len], 511-len, "1. STEAMID^n",id) len += format(menuBody[len], 511-len, "2. IP^n",id) format(menuBody[len], 511-len, "^n0. Exit",id) show_menu(id, keys, menuBody, -1, "UnBan STEAMID or IP?") } public cmdUnBanMenu(id,level,cid) { if(!cmd_access(id,level,cid,1)) return PLUGIN_HANDLED g_menuUnBanType[id] = -1 displayUnBanMenuType(id) return PLUGIN_HANDLED }
Отправить
Загрузил
popca2424
2022-05-05 17:20:26
0
131
Установить на сервер
Скачать
Нет оплаченых серверов
Купить сервер CS 1.6
Купить сервер CS:GO
Купить сервер CSS v34
Подключить свой VDS к панели
Данная иконка означает, что плагин был проверен администрацией хостинга на тестовом сервере, и проблем с ним не было выявлено. Рекомендуем ставить исключительно проверенные плагины.
Плагин загружен на сервер, но проверка еще не была проведена.
CSHOST.COM.UA 2012-2025 Хостинг игровых серверов