Плагин скриншот при бане

Система скриншотов при бане для amxbans 5.0

Сообщений: 425
Благодарностей: 155
Полезность: 335

NexTTT

Ребята, я знаю что тут эта тема где то есть, но что то у меня не получается ее найти поиском. Подскажите пожалуйста плагин, который будет автоматически делать скриншоты у игрока перед баном, а потом банить через амхбанс 5. И еще я помню, что его можно сразу в amxmodmenu меню втащить было. Не ругайте за тупость, раньше уже такое находил и ставил, а сейчас у меня тупежный ступор)

Сообщений: 1677
Благодарностей: 735
Полезность: 571

Сообщений: 334
Благодарностей: 152
Полезность: 705

Перевод
[ru] Russian — CKOTuHA

NexTTT,
А почему бы 6й не поставить?

Сообщений: 810
Благодарностей: 198
Полезность: 494

Стаж: 8 лет 6 месяцев

Сообщений: 302
Благодарностей: 62
Полезность: 0

Стаж: 8 лет 8 месяцев

Сообщений: 5978
Благодарностей: 5494
Полезность: 1119

Стаж: 8 лет 6 месяцев

Сообщений: 302
Благодарностей: 62
Полезность: 0

Стаж: 8 лет 8 месяцев

Сообщений: 5978
Благодарностей: 5494
Полезность: 1119

Стаж: 8 лет 6 месяцев

Сообщений: 302
Благодарностей: 62
Полезность: 0

Сообщений: 7522
Благодарностей: 5403
Полезность: 1290

Стаж: 8 лет 8 месяцев

Сообщений: 5978
Благодарностей: 5494
Полезность: 1119

Сообщений: 80
Благодарностей: 16
Полезность: 158

Скриншоты имхо непрактично
Думаю во всех «крутых читах» уже есть правило если в системе скриншот то офнутся. Когда я с читами гонял, в моем чите была похожая опция это было еще года 4 назад.
Маньяки КСа некогда навернутся на сервер где по ошибке банят игрков и антипиар вам обеспечен.
Если тебе и прислали пустые скрины то можно за это забанить, это какой-то школьник и сервер без него станет только луче.
Какой нормальный человек станет регаться на школоло форуме ради разбана когда точных копий сервера сотни с оптимальным пингом, а зареганого постояльца некто не забанит.
Скрины легко подредактировать, ну смотря какие косяки. Когда я бегал, у меня ВХ маленькая точка бегала за стеной, даже имбицил сможет подправить скрин в том же пейнте.

Стаж: 12 лет
Город: Санкт-Петербург

Сообщений: 4700
Благодарностей: 2451
Полезность: 1018

просто нужно проявить хитрость и не лепить на пол экрана надписи «АДМИН ДЕЛАЕТ ВАМ СКРИНШОТ УЛЫБНИТЕСЬ БЛЕАТЬ И ЩАС ВАС ЕЩЕ ЗАБАНИТ ЧЕРЕЗ 5 СЕКУНД ОЛОЛО ТРООЛОЛО КАРТА ДЕ_ДУСТ2НА2 ТАЙМ 14:88»

у меня есть пара идей насчет этого

Стаж: 8 лет 8 месяцев

Сообщений: 5978
Благодарностей: 5494
Полезность: 1119

просто нужно проявить хитрость и не лепить на пол экрана надписи «АДМИН ДЕЛАЕТ ВАМ СКРИНШОТ УЛЫБНИТЕСЬ БЛЕАТЬ И ЩАС ВАС ЕЩЕ ЗАБАНИТ ЧЕРЕЗ 5 СЕКУНД ОЛОЛО ТРООЛОЛО КАРТА ДЕ_ДУСТ2НА2 ТАЙМ 14:88»

у меня есть пара идей насчет этого

делали. даже просто точку на радаре ввиде знака ssban. )) но тогда такой скрин подлелать вообще без проблем. делали вывод сообщения на 2 и 3 скриншотах. Пришли к выводу, что пока у игрока есть вариант самому сделать скрины, ssban будет бессмысленным плагином.

Сообщений: 425
Благодарностей: 155
Полезность: 335

На благо всем могу сделаем встречное предложение. Могу заплатить ну рублей 500 скриптеру, который сделает нормальный скриншотер без мигающих худов, с нормальной привязкой что к 5, что к 6 бансу + чтобы этот плагин встраивался в amxmodmenu. Желательно не простой копипаст ссбана, а какие то новые идеи. Предлагайте. Работа будет сделана — выложу в паблик. Мне не жалко. Предлагаю тут обсуждать эти самые идеи для доработанного ссбана. Думаю, что вещь нужная всем будет. 500 р — не много, но для общей пользы я думаю, что норм инвестиция.

зы. Чтобы плагин не лежал в паблике и через месяц от него не было самого элементарного обхода, предлагаю плагин выложить тут без исходника. Исходник не будет даже у меня, а допустим только у illusion’a. Он сам проверит и скомпилирует плагин. Т.е по выполнинии работы, исходник отдастся только гл. админу этого сайта, а он запостит его где нибудь на форуме.

Перевод
[ru] Russian — CKOTuHA

NexTTT,
А почему бы 6й не поставить?

у меня амхбанс прямо от сервачка (хостинга) — мне неохото заморачиваться.

Источник статьи: http://c-s.net.ua/forum/topic44429.html

Плагин скриншот при бане

Shadows In Rain писал(а): Сейчас «рынок» плагинов напоминает какой-то нелегальный подвальный клуб, куда приходит непонятно кто, заказывает непонятно что, а за косяки приезжает разбираться с братвой на уазиках.

amx_banss не делает скрины при бане!

Модератор: liFe iS GoOD

  • Список форумовAMX Mod XВопросы по AMXX и его плагинам

Правила форума
1. Запрещено материться и оскорблять других участников форума.
2. Запрещен флуд, оффтоп, дабл постинг во всех разделах форума, кроме раздела «Болтовня».
3. Запрещено взламывать сайт/форум или наносить любой вред проекту.
4. Запрещено рекламировать другие ресурсы.
5. Запрещено создавать темы без информативного названия. Название темы должно отображать ее смысл.

В данном разделе форума разрешено создавать темы, касающие только вопросов по AMX Mod X и его плагинам.

amx_banss не делает скрины при бане!

pwned » 27 авг 2014, 01:50

Re: amx_banss не делает скрины при бане!

RevCrew » 27 авг 2014, 19:05

Re: amx_banss не делает скрины при бане!

pwned » 27 авг 2014, 21:05

Re: amx_banss не делает скрины при бане!

RevCrew » 27 авг 2014, 22:41

открываешь plmenu.sma находишь
[pawn]

и добавляешь [pawn]

Re: amx_banss не делает скрины при бане!

pwned » 27 авг 2014, 23:07

открываешь plmenu.sma находишь
[pawn]

и добавляешь [pawn]

Добавлено спустя 6 минут 18 секунд:
вот как у меня plmenu ща
Код: Выделить всё /* AMX Mod X
* Players Menu Plugin
*
* by the AMX Mod X Development Team
* originally developed by OLO
*
* This file is part of AMX Mod X.
*
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, the author gives permission to
* link the code of this program with the Half-Life Game Engine («HL
* Engine») and Modified Game Libraries («MODs») developed by Valve,
* L.L.C («Valve»). You must obey the GNU General Public License in all
* respects for all of the code used other than the HL Engine and MODs
* from Valve. If you modify this file, you may extend this exception
* to your version of the file, but you are not obligated to do so. If
* you do not wish to do so, delete this exception statement from your
* version.
*/

/** skip autoloading since it’s optional */
#define AMXMODX_NOAUTOLOAD
#include

new g_menuPosition[33]
new g_menuPlayers[33][32]
new g_menuPlayersNum[33]
new g_menuOption[33]
new g_menuSettings[33]

new g_menuSelect[33][64]
new g_menuSelectNum[33]

#define MAX_CLCMDS 24

new g_clcmdName[MAX_CLCMDS][32]
new g_clcmdCmd[MAX_CLCMDS][64]
new g_clcmdMisc[MAX_CLCMDS][2]
new g_clcmdNum

new g_coloredMenus
new g_cstrike = 0

new Array:g_bantimes;
new Array:g_slapsettings;

public plugin_natives()
<
set_module_filter(«module_filter»)
set_native_filter(«native_filter»)
>

public plugin_init()
<
register_plugin(«Players Menu», AMXX_VERSION_STR, «AMXX Dev Team»)
register_dictionary(«common.txt»)
register_dictionary(«admincmd.txt»)
register_dictionary(«plmenu.txt»)

register_clcmd(«amx_kickmenu», «cmdKickMenu», ADMIN_KICK, «- displays kick menu»)
register_clcmd(«amx_banmenu», «cmdBanMenu», ADMIN_BAN, «- displays ban menu»)
register_clcmd(«amx_slapmenu», «cmdSlapMenu», ADMIN_SLAY, «- displays slap/slay menu»)
register_clcmd(«amx_teammenu», «cmdTeamMenu», ADMIN_LEVEL_A, «- displays team menu»)
register_clcmd(«amx_clcmdmenu», «cmdClcmdMenu», ADMIN_LEVEL_A, «- displays client cmds menu»)
register_clcmd(«amx_banreason», «CmdBanReason», ADMIN_BAN, » «);

register_menucmd(register_menuid(«Ban Menu»), 1023, «actionBanMenu»)
register_menucmd(register_menuid(«Kick Menu»), 1023, «actionKickMenu»)
register_menucmd(register_menuid(«Slap/Slay Menu»), 1023, «actionSlapMenu»)
register_menucmd(register_menuid(«Team Menu»), 1023, «actionTeamMenu»)
register_menucmd(register_menuid(«Client Cmds Menu»), 1023, «actionClcmdMenu»)

g_bantimes = ArrayCreate();
// Load up the old default values
ArrayPushCell(g_bantimes, 0);
ArrayPushCell(g_bantimes, 5);
ArrayPushCell(g_bantimes, 10);
ArrayPushCell(g_bantimes, 15);
ArrayPushCell(g_bantimes, 30);
ArrayPushCell(g_bantimes, 45);
ArrayPushCell(g_bantimes, 60);

g_slapsettings = ArrayCreate();
// Old default values
ArrayPushCell(g_slapsettings, 0); // First option is ignored — it is slay
ArrayPushCell(g_slapsettings, 0); // slap 0 damage
ArrayPushCell(g_slapsettings, 1);
ArrayPushCell(g_slapsettings, 5);

register_srvcmd(«amx_plmenu_bantimes», «plmenu_setbantimes»);
register_srvcmd(«amx_plmenu_slapdmg», «plmenu_setslapdmg»);

new clcmds_ini_file[64]
get_configsdir(clcmds_ini_file, 63)
format(clcmds_ini_file, 63, «%s/clcmds.ini», clcmds_ini_file)
load_settings(clcmds_ini_file)

if (module_exists(«cstrike»))
g_cstrike = 1
>
public plmenu_setbantimes()
<
new buff[32];
new args = read_argc();

if (args [time2] [time3] . «);
server_print(» use time of 0 for permanent.»);

for (new i = 1; i [dmg2] [dmg3] . «);
server_print(» slay is automatically set for the first value.»);

ArrayPushCell(g_slapsettings, 0); // compensate for slay

for (new i = 1; i <>^» ban and kick ^»%s <>^» (minutes ^»%d^») (reason ^»%s^»)», name, get_user_userid(id), authid, name2, userid2, authid2, g_menuSettings[id], reason)

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);
>

public actionBanMenu(id, key)
<
switch (key)
<
case 7:
<
/* BEGIN OF CHANGES BY MISTAGEE ADDED A FEW MORE OPTIONS */

++g_menuOption[id]
g_menuOption[id] %= ArraySize(g_bantimes);

g_menuSettings[id] = ArrayGetCell(g_bantimes, g_menuOption[id]);

displayBanMenu(id, g_menuPosition[id])
>
case 8: displayBanMenu(id, ++g_menuPosition[id])
case 9: displayBanMenu(id, —g_menuPosition[id])
default:
<
g_ban_player[id] = g_menuPlayers[id][g_menuPosition[id] * 7 + key]

client_cmd(id, «messagemode amx_banreason»);

client_print(id, print_chat, «[AMXX] Type in the reason for banning this player.»);

/*new name[32], name2[32], authid[32], authid2[32]

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)
client_cmd(id,»amx_ssban #%d %d ^»Unban Site : Вы должны зарегистрироваться, чтобы видеть ссылки. ^»»,userid2,g_menuSettings[id])

log_amx(«Ban: ^»%s <>^» ban and kick ^»%s <>^» (minutes ^»%d^»)», name, get_user_userid(id), authid, name2, userid2, authid2, g_menuSettings[id])

if (g_menuSettings[id]==0) // permanent
<
new maxpl = get_maxplayers();
for (new i = 1; i = g_menuPlayersNum[id])
start = pos = g_menuPosition[id] = 0

new len = format(menuBody, 511, g_coloredMenus ? «\y%L\R%d/%d^n\w^n» : «%L %d/%d^n^n», id, «BAN_MENU», pos + 1, (g_menuPlayersNum[id] / 7 + ((g_menuPlayersNum[id] % 7) ? 1 : 0)))
new end = start + 7
new keys = MENU_KEY_0|MENU_KEY_8

if (end > g_menuPlayersNum[id])
end = g_menuPlayersNum[id]

for (new a = start; a 0)
<
g_menuSettings[id] = ArrayGetCell(g_bantimes, g_menuOption[id]);
>
else
<
// should never happen, but failsafe
g_menuSettings[id] = 0
>
displayBanMenu(id, g_menuPosition[id] = 0)

public actionSlapMenu(id, key)
<
switch (key)
<
case 7:
<
++g_menuOption[id]

g_menuSettings[id] = ArrayGetCell(g_slapsettings, g_menuOption[id]);

displaySlapMenu(id, g_menuPosition[id]);
>
case 8: displaySlapMenu(id, ++g_menuPosition[id])
case 9: displaySlapMenu(id, —g_menuPosition[id])
default:
<
new player = g_menuPlayers[id][g_menuPosition[id] * 7 + key]
new name2[32]

get_user_name(player, name2, 31)

if (!is_user_alive(player))
<
client_print(id, print_chat, «%L», id, «CANT_PERF_DEAD», name2)
displaySlapMenu(id, g_menuPosition[id])
return PLUGIN_HANDLED
>

new authid[32], authid2[32], name[32]

get_user_authid(id, authid, 31)
get_user_authid(player, authid2, 31)
get_user_name(id, name, 31)

if (g_menuOption[id])
<
log_amx(«Cmd: ^»%s <>^» slap with %d damage ^»%s <>^»», name, get_user_userid(id), authid, g_menuSettings[id], name2, get_user_userid(player), authid2)

show_activity_key(«ADMIN_SLAP_1», «ADMIN_SLAP_2», name, name2, g_menuSettings[id]);
> else <
log_amx(«Cmd: ^»%s <>^» slay ^»%s <>^»», name, get_user_userid(id), authid, name2, get_user_userid(player), authid2)

show_activity_key(«ADMIN_SLAY_1», «ADMIN_SLAY_2», name, name2);
>

if (g_menuOption[id])
user_slap(player, (get_user_health(player) > g_menuSettings[id]) ? g_menuSettings[id] : 0)
else
user_kill(player)

displaySlapMenu(id, pos)
<
if (pos = g_menuPlayersNum[id])
start = pos = g_menuPosition[id] = 0

new len = format(menuBody, 511, g_coloredMenus ? «\y%L\R%d/%d^n\w^n» : «%L %d/%d^n^n», id, «SLAP_SLAY_MENU», pos + 1, (g_menuPlayersNum[id] / 7 + ((g_menuPlayersNum[id] % 7) ? 1 : 0)))
new end = start + 7
new keys = MENU_KEY_0|MENU_KEY_8

if (end > g_menuPlayersNum[id])
end = g_menuPlayersNum[id]

for (new a = start; a 0)
<
g_menuSettings[id] = ArrayGetCell(g_slapsettings, g_menuOption[id]);
>
else
<
// should never happen, but failsafe
g_menuSettings[id] = 0
>

displaySlapMenu(id, g_menuPosition[id] = 0)

public actionKickMenu(id, key)
<
switch (key)
<
case 8: displayKickMenu(id, ++g_menuPosition[id])
case 9: displayKickMenu(id, —g_menuPosition[id])
default:
<
new player = g_menuPlayers[id][g_menuPosition[id] * 8 + key]
new authid[32], authid2[32], name[32], name2[32]

get_user_authid(id, authid, 31)
get_user_authid(player, authid2, 31)
get_user_name(id, name, 31)
get_user_name(player, name2, 31)

new userid2 = get_user_userid(player)

log_amx(«Kick: ^»%s <>^» kick ^»%s <>^»», name, get_user_userid(id), authid, name2, userid2, authid2)

show_activity_key(«ADMIN_KICK_1», «ADMIN_KICK_2», name, name2);

server_cmd(«kick #%d», userid2)
server_exec()

displayKickMenu(id, pos)
<
if (pos = g_menuPlayersNum[id])
start = pos = g_menuPosition[id] = 0

new len = format(menuBody, 511, g_coloredMenus ? «\y%L\R%d/%d^n\w^n» : «%L %d/%d^n^n», id, «KICK_MENU», pos + 1, (g_menuPlayersNum[id] / 8 + ((g_menuPlayersNum[id] % 8) ? 1 : 0)))
new end = start + 8
new keys = MENU_KEY_0

if (end > g_menuPlayersNum[id])
end = g_menuPlayersNum[id]

for (new a = start; a <>^» transfer ^»%s <>^» (team ^»%s^»)», name, get_user_userid(id), authid, name2, get_user_userid(player), authid2, g_menuOption[id] ? «TERRORIST» : «CT»)

show_activity_key(«ADMIN_TRANSF_1», «ADMIN_TRANSF_2», name, name2, g_CSTeamNames[g_menuOption[id] % 3]);

if (g_cstrike)
<
if (is_user_alive(player))
<
new deaths = cs_get_user_deaths(player)
user_kill(player, 1)
cs_set_user_deaths(player, deaths)
>
// This modulo math just aligns the option to the CsTeams-corresponding number
cs_set_user_team(player, (g_menuOption[id] % 3) + 1)
cs_reset_user_model(player)
> else <
new limit_setting = get_cvar_num(«mp_limitteams»)

set_cvar_num(«mp_limitteams», 0)
engclient_cmd(player, «jointeam», g_CSTeamNumbers[g_menuOption[id] % 2])
engclient_cmd(player, «joinclass», «1»)
set_cvar_num(«mp_limitteams», limit_setting)
>

displayTeamMenu(id, pos)
<
if (pos = g_menuPlayersNum[id])
start = pos = g_menuPosition[id] = 0

new len = format(menuBody, 511, g_coloredMenus ? «\y%L\R%d/%d^n\w^n» : «%L %d/%d^n^n», id, «TEAM_MENU», pos + 1, (g_menuPlayersNum[id] / 7 + ((g_menuPlayersNum[id] % 7) ? 1 : 0)))
new end = start + 7
new keys = MENU_KEY_0|MENU_KEY_8

if (end > g_menuPlayersNum[id])
end = g_menuPlayersNum[id]

for (new a = start; a = g_menuPlayersNum[id])
start = pos = g_menuPosition[id] = 0

new len = format(menuBody, 511, g_coloredMenus ? «\y%L\R%d/%d^n\w^n» : «%L %d/%d^n^n», id, «CL_CMD_MENU», pos + 1, (g_menuPlayersNum[id] / 7 + ((g_menuPlayersNum[id] % 7) ? 1 : 0)))
new end = start + 7
new keys = MENU_KEY_0|MENU_KEY_8

if (end > g_menuPlayersNum[id])
end = g_menuPlayersNum[id]

for (new a = start; a 3)
<
while (replace(g_clcmdCmd[g_clcmdNum], 63, «\'», «^»»))
<
// do nothing
>

g_clcmdMisc[g_clcmdNum][1] = read_flags(szFlags)
g_clcmdMisc[g_clcmdNum][0] = read_flags(szAccess)
g_clcmdNum++
>
>

return 1
>
/* AMXX-Studio Notes — DO NOT MODIFY BELOW HERE
*<\\ rtf1\\ ansi\\ deff0<\\ fonttbl<\\ f0\\ fnil Tahoma;>>\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par >
*/

а это advanced_bans
Код: Выделить всё /*
amx_ss — Make snapshots on user !

amx_ssmsg_type 3 // 1- chat | 2- hud | 3- chat+hud (Def.: 3)
amx_ssnumber 7 // Number of snapshots to take (Def.: 3)
amx_ssdelay 1.2 // Delay between snapshots (Def.: 1.0)
*/

#define PLUGIN_NAME «experience. Falcon»
#define PLUGIN_VERSION «0.7»
#define PLUGIN_AUTHOR «experience. Falcon»

#pragma semicolon 1

// uncomment the line below if you want this plugin to
// load old bans from the banned.cfg and listip.cfg files
//#define KEEP_DEFAULT_BANS

// uncomment the line below if you want the history to be in one file
//#define HISTORY_ONE_FILE

// if you must have a maximum amount of bans to be compatible with AMXX versions before 1.8.0
// change this number to your maximum amount
// if you would rather have unlimited (requires AMXX 1.8.0 or higher) then set it to 0
#define MAX_BANS 0

#define REGEX_IP_PATTERN «\b(251|219|[01]?93?)\.(253|212|[01]?21?)\.(253|221|[01]?76?)\.(255|218|[01]?14?)\b»
#define REGEX_STEAMID_PATTERN «^^STEAM_0:(0|1):\d+$»

new Regex:g_IP_pattern;
new Regex:g_SteamID_pattern;
new g_regex_return;

/*bool:IsValidIP(const ip[])
<
return regex_match_c(ip, g_IP_pattern, g_regex_return) > 0;
>*/

#define IsValidIP(%1) (regex_match_c(%1, g_IP_pattern, g_regex_return) > 0)

/*bool:IsValidAuthid(const authid[])
<
return regex_match_c(authid, g_SteamID_pattern, g_regex_return) > 0;
>*/

#define IsValidAuthid(%1) (regex_match_c(%1, g_SteamID_pattern, g_regex_return) > 0)

enum // for name displaying
<
ACTIVITY_NONE, // nothing is shown
ACTIVITY_HIDE, // admin name is hidden
ACTIVITY_SHOW // admin name is shown
>;
new const g_admin_activity[] =
<
ACTIVITY_NONE, // amx_show_activity 0 = show nothing to everyone
ACTIVITY_HIDE, // amx_show_activity 1 = hide admin name from everyone
ACTIVITY_SHOW, // amx_show_activity 2 = show admin name to everyone
ACTIVITY_SHOW, // amx_show_activity 3 = show name to admins but hide it from normal users
ACTIVITY_SHOW, // amx_show_activity 4 = show name to admins but show nothing to normal users
ACTIVITY_HIDE // amx_show_activity 5 = hide name from admins but show nothing to normal users
>;
new const g_normal_activity[] =
<
ACTIVITY_NONE, // amx_show_activity 0 = show nothing to everyone
ACTIVITY_HIDE, // amx_show_activity 1 = hide admin name from everyone
ACTIVITY_SHOW, // amx_show_activity 2 = show admin name to everyone
ACTIVITY_HIDE, // amx_show_activity 3 = show name to admins but hide it from normal users
ACTIVITY_NONE, // amx_show_activity 4 = show name to admins but show nothing to normal users
ACTIVITY_NONE // amx_show_activity 5 = hide name from admins but show nothing to normal users
>;

ab_website = register_cvar(«ab_website», «http://eff.serv.ru»);
ab_immunity = register_cvar(«ab_immunity», «1»);
ab_unbancheck = register_cvar(«ab_unbancheck», «5.0»);

register_concmd(«amx_ss», «ss_menu», ADMIN_KICK, «- Make snapshots on user(menu)»);
g_MsgType = register_cvar(«amx_ssmsg_type», «3»); // 1- chat | 2- hud | 3- chat+hud (Def.: 3)
g_SnapShot = register_cvar(«amx_ssnumber», «7»); // Number of snapshots to take (Def.: 3)
g_DelaySS = register_cvar(«amx_ssdelay», «1.2»); // Delay between snapshots (Def.: 1.0)

amx_show_activity = register_cvar(«amx_show_activity», «2»);

get_datadir(g_ban_file, sizeof(g_ban_file) — 1);
add(g_ban_file, sizeof(g_ban_file) — 1, «/advanced_bans.txt»);

#if MAX_BANS 0
static banned_authid[35], bool:is_ip;
for( new i = 0; i maxlength) )
<
console_print(client, «[experience. Falcon] %L», client, «AB_MAX_BAN_TIME», maxlength);
return PLUGIN_HANDLED;
>

static unban_time[64];
if( length == 0 )
<
formatex(unban_time, sizeof(unban_time) — 1, «%L», client, «AB_PERMANENT_BAN»);
>
else
<
GenerateUnbanTime(length, unban_time, sizeof(unban_time) — 1);
>

read_argv(3, arg, sizeof(arg) — 1);

static admin_name[64], target_name[32];
get_user_name(client, admin_name, sizeof(admin_name) — 1);
get_user_name(target, target_name, sizeof(target_name) — 1);

static admin_ip[35];
new target_ip[35];
get_user_ip(client, admin_ip, sizeof(admin_ip) — 1, 1);
get_user_ip(target, target_ip, sizeof(target_ip) — 1, 1);

AddBan(target_name, target_authid, arg, length, unban_time, admin_name, admin_ip);
AddBan(target_name, target_ip, arg, length, unban_time, admin_name, admin_ip);

PrintBanInformation(target, target_name, target_authid, arg, length, unban_time, admin_name, admin_ip, true, true);
PrintBanInformation(client, target_name, target_authid, arg, length, unban_time, admin_name, admin_ip, false, false);

new Param[2];
Param[0] = client;
Param[1] = target;
set_task(0.1, «SS_Ban», target, Param,2);

new Float:DelayBan = get_pcvar_float(g_DelaySS) * float(get_pcvar_num(g_SnapShot)) + 0.2;
set_task(DelayBan, «TaskDisconnectPlayer», target);

GetBanTime(length, unban_time, sizeof(unban_time) — 1);

PrintActivity(admin_name, «Админ $name: забанил %s. Причина: %s. Продолжительность: %s», target_name, arg, unban_time);
client_cmd(client, «Snapshot»);
Log(«%s banned %s || Reason: ^»%s^» || Ban Length: %s», admin_name, admin_ip, target_name, target_authid, arg, unban_time);

public CmdBanIp(client, level, cid)
<
if( !cmd_access(client, level, cid, 4) ) return PLUGIN_HANDLED;

static arg[128];
read_argv(1, arg, sizeof(arg) — 1);

new target = cmd_target(client, arg, GetTargetFlags(client));
if( !target ) return PLUGIN_HANDLED;

static target_ip[35];
get_user_ip(target, target_ip, sizeof(target_ip) — 1, 1);

#if MAX_BANS maxlength) )
<
console_print(client, «[experience. Falcon] %L», client, «AB_MAX_BAN_TIME», maxlength);
return PLUGIN_HANDLED;
>

if( length == 0 )
<
formatex(unban_time, sizeof(unban_time) — 1, «%L», client, «AB_PERMANENT_BAN»);
>
else
<
GenerateUnbanTime(length, unban_time, sizeof(unban_time) — 1);
>

read_argv(3, arg, sizeof(arg) — 1);

static admin_name[64], target_name[32];
get_user_name(client, admin_name, sizeof(admin_name) — 1);
get_user_name(target, target_name, sizeof(target_name) — 1);

static admin_ip[35];
get_user_authid(client, admin_ip, sizeof(admin_ip) — 1);

AddBan(target_name, target_ip, arg, length, unban_time, admin_name, admin_ip);

PrintBanInformation(target, target_name, target_ip, arg, length, unban_time, admin_name, admin_ip, true, true);
PrintBanInformation(client, target_name, target_ip, arg, length, unban_time, admin_name, admin_ip, false, false);

new Float:DelayBan = get_pcvar_float(g_DelaySS) * float(get_pcvar_num(g_SnapShot)) + 0.2;
set_task(DelayBan, «TaskDisconnectPlayer», target);

GetBanTime(length, unban_time, sizeof(unban_time) — 1);

PrintActivity(admin_name, «Админ $name: забанил %s. Причина: %s. Продолжительность: %s», target_name, arg, unban_time);
client_cmd(client, «Snapshot»);
Log(«%s banned %s || Reason: ^»%s^» || Ban Length: %s», admin_name, admin_ip, target_name, target_ip, arg, unban_time);

public CmdAddBan(client, level, cid)
<
if( !cmd_access(client, level, cid, 5) ) return PLUGIN_HANDLED;

static target_name[32], target_authid[35], bantime[10], reason[128];
read_argv(1, target_name, sizeof(target_name) — 1);
read_argv(2, target_authid, sizeof(target_authid) — 1);
read_argv(3, bantime, sizeof(bantime) — 1);
read_argv(4, reason, sizeof(reason) — 1);

new bool:is_ip = bool:(containi(target_authid, «.») != -1);

return PLUGIN_HANDLED;
>
else if( is_ip )
<
new pos = contain(target_authid, «:»);
if( pos > 0 )
<
target_authid[pos] = 0;
>

if( !IsValidIP(target_authid) )
<
console_print(client, «[experience. Falcon] %L», client, «AB_INVALID_IP»);

#if MAX_BANS maxlength) )
<
console_print(client, «[experience. Falcon] %L», client, «AB_MAX_BAN_TIME», maxlength);
return PLUGIN_HANDLED;
>

if( is_user_connected(find_player(is_ip ? «d» : «c», target_authid)) )
<
client_cmd(client, «amx_ban ^»%s^» %i ^»%s^»», target_authid, length, reason);
return PLUGIN_HANDLED;
>

static unban_time[32];
if( length == 0 )
<
formatex(unban_time, sizeof(unban_time) — 1, «%L», client, «AB_PERMANENT_BAN»);
>
else
<
GenerateUnbanTime(length, unban_time, sizeof(unban_time) — 1);
>

static admin_name[64], admin_ip[35];
get_user_name(client, admin_name, sizeof(admin_name) — 1);
get_user_authid(client, admin_ip, sizeof(admin_ip) — 1);

AddBan(target_name, target_authid, reason, length, unban_time, admin_name, admin_ip);

PrintBanInformation(client, target_name, target_authid, reason, length, unban_time, «», «», false, false);

GetBanTime(length, unban_time, sizeof(unban_time) — 1);

PrintActivity(admin_name, «Админ $name: забанил %s. Причина: %s. Ban Length: %s», is_ip ? «IP» : «SteamID», target_authid, reason, unban_time);
client_cmd(client, «Snapshot»);

Log(«%s banned %s || Reason: ^»%s^» || Ban Length: %s», admin_name, admin_ip, target_name, target_authid, reason, unban_time);

public CmdUnban(client, level, cid)
<
if( !cmd_access(client, level, cid, 2) ) return PLUGIN_HANDLED;

static arg[35];
read_argv(1, arg, sizeof(arg) — 1);

#if MAX_BANS > 0
static banned_authid[35];
for( new i = 0; i unbanned %s || Ban Reason: ^»%s^»», admin_name, authid, name, arg, reason);

return PLUGIN_HANDLED;
>
>
#else
if( TrieKeyExists(g_trie, arg) )
<
static array_pos;
TrieGetCell(g_trie, arg, array_pos);

static data[BannedData];
ArrayGetArray(g_array, array_pos, data);

static unban_name[32];
get_user_name(client, unban_name, sizeof(unban_name) — 1);

PrintActivity(unban_name, «Админ $name: разбанил %s [%s] [Причина бана: %s]», data[bd_name], data[bd_steamid], data[bd_reason]);

return PLUGIN_HANDLED;
>
#endif

console_print(client, «[experience. Falcon] %L», client, «AB_NOT_IN_BAN_LIST», arg);

public CmdBanList(client, level, cid)
<
if( !cmd_access(client, level, cid, 1) ) return PLUGIN_HANDLED;

if( !g_total_bans )
<
console_print(client, «[experience. Falcon] %L», client, «AB_NO_BANS»);
return PLUGIN_HANDLED;
>

if( read_argc() > 1 )
<
static arg[5];
read_argv(1, arg, sizeof(arg) — 1);

start = min(str_to_num(arg), g_total_bans) — 1;
>
else
<
start = 0;
>

new last = min(start + 10, g_total_bans);

console_print(client, «%L», client, «AB_BAN_LIST_NUM», start + 1, last);

for( new i = start; i «);
return PLUGIN_HANDLED;
>

read_argv(1, arg, sizeof(arg) — 1);
new flags = read_flags(arg);

read_argv(2, arg, sizeof(arg) — 1);
new minutes = str_to_num(arg);

#if !defined MAX_BANLIMITS
ArrayPushCell(g_maxban_flags, flags);
ArrayPushCell(g_maxban_times, minutes);
#else
if( g_total_maxban_times >= MAX_BANLIMITS )
<
log_amx(«The amx_addbanlimit has reached its maximum!»);
return PLUGIN_HANDLED;
>

g_maxban_flags[g_total_maxban_times] = flags;
g_maxban_times[g_total_maxban_times] = minutes;
#endif
g_total_maxban_times++;

public FwdThink(entity)
<
if( entity != g_unban_entity ) return;

if( g_total_bans > 0 )
<
static _hours[5], _minutes[5], _seconds[5], _month[5], _day[5], _year[7];
format_time(_hours, sizeof(_hours) — 1, «%H»);
format_time(_minutes, sizeof(_minutes) — 1, «%M»);
format_time(_seconds, sizeof(_seconds) — 1, «%S»);
format_time(_month, sizeof(_month) — 1, «%m»);
format_time(_day, sizeof(_day) — 1, «%d»);
format_time(_year, sizeof(_year) — 1, «%Y»);

// c = current
// u = unban

new c_hours = str_to_num(_hours);
new c_minutes = str_to_num(_minutes);
new c_seconds = str_to_num(_seconds);
new c_month = str_to_num(_month);
new c_day = str_to_num(_day);
new c_year = str_to_num(_year);

static unban_time[32];
static u_hours, u_minutes, u_seconds, u_month, u_day, u_year;

for( new i = 0; i new client = Param[1];
new timer[32], hostname[64], name[32], name2[32], ip[32], authid2[32], country[33], site[64];

get_user_name(id, name, 31);
get_user_name(client, name2, 31);
get_user_authid(client, authid2, 31);
get_user_ip(client, ip, 31, 1);

get_time(«%d/%m/%Y — %H:%M:%S», timer, 63);

get_cvar_string(«hostname», hostname, charsmax(hostname));
get_pcvar_string(ab_website, site, charsmax(site));

switch(get_pcvar_num(g_MsgType))
<
case 1:
<
/* Show screen messages in chat */
client_printc(client,»%L», client, «SS_MSG1», name);
client_printc(client,»%L», client, «SS_MSG2», timer, hostname);
client_printc(client,»%L», client, «SS_MSG3», name2, ip, authid2, country);
client_printc(client,»%L», client, «SS_MSG4», site);
>
case 2:
<
/* Show screen messages in hud */
set_hudmessage(150, 0, 255, -1.0, 0.1, 0, 0.25, 1.0, 0.0, 0.0, 4);
show_hudmessage(client, «%L», client, «SS_MSG_HUD», timer, hostname, name2, ip, authid2, country, site);
>
case 3:
<
/* Show screen messages in chat */
client_printc(client,»%L», client, «SS_MSG1», name);
client_printc(client,»%L», client, «SS_MSG2», timer, hostname);
client_printc(client,»%L», client, «SS_MSG3», name2, ip, authid2, country);
client_printc(client,»%L», client, «SS_MSG4», site);

/* Show screen messages in hud */
set_hudmessage(150, 0, 255, -1.0, 0.1, 0, 0.25, 1.0, 0.0, 0.0, -1);
show_hudmessage(client, «%L», client, «SS_MSG_HUD», timer, hostname, name2, ip, authid2, country, site);
>
>

set_task(Float:get_pcvar_float(g_DelaySS), «SS_DO», 0, Param,2, «a», get_pcvar_num(g_SnapShot));

public SS_Task(Param[2])
<
new client = Param[1];
new timer[32], hostname[64], name2[32], ip[32], authid2[32], country[33], site[64];

get_user_name(client, name2, 31);
get_user_authid(client, authid2, 31);
get_user_ip(client, ip, 31, 1);

get_time(«%d/%m/%Y — %H:%M:%S», timer, 63);

get_cvar_string(«hostname», hostname, charsmax(hostname));
get_pcvar_string(ab_website, site, charsmax(site));

switch(get_pcvar_num(g_MsgType))
<
case 1:
<
/* Show screen messages in chat */
client_printc(client,»%L», client, «SS_MSG2», timer, hostname);
client_printc(client,»%L», client, «SS_MSG3», name2, ip, authid2, country);
>
case 2:
<
/* Show screen messages in hud */
set_hudmessage(150, 0, 255, -1.0, 0.1, 0, 0.25, 1.0, 0.0, 0.0, 4);
show_hudmessage(client, «%L», client, «SS_MSG_HUD_BAN», timer, hostname, name2, ip, authid2, country);
>
case 3:
<
/* Show screen messages in chat */
client_printc(client,»%L», client, «SS_MSG2», timer, hostname);
client_printc(client,»%L», client, «SS_MSG3», name2, ip, authid2, country);

/* Show screen messages in hud */
set_hudmessage(150, 0, 255, -1.0, -1.0, 0, 0.25, 1.0, 0.0, 0.0, -1);
show_hudmessage(client, «%L», client, «SS_MSG_HUD_BAN», timer, hostname, name2, ip, authid2, country);
>
>

set_task(Float:get_pcvar_float(g_DelaySS), «SS_DO», 0, Param,2, «a», get_pcvar_num(g_SnapShot));

public SS_DO(Param[2])
<
new client = Param[1];
if(is_user_connected(client))
client_cmd(client, «snapshot»);
>

/* Stock colors for chat messages */
stock client_printc(const id, const string[], . ) <

new msg[191], players[32], count = 1;
vformat(msg, sizeof msg — 1, string, 3);

replace_all(msg,190,»!g»,»^4″);
replace_all(msg,190,»!y»,»^1″);
replace_all(msg,190,»!t»,»^3″);

if(id)
players[0] = id;
else
get_players(players,count,»ch»);

for (new i = 0 ; i 0
if( g_total_bans == MAX_BANS )
<
log_amx(«Ban list is full! (%i)», g_total_bans);
return;
>
#endif

new f = fopen(g_ban_file, «a+»);

fprintf(f, «^»%s^» ^»%s^» %i ^»%s^» ^»%s^» ^»%s^» ^»%s^»^n»,\
target_steamid,\
target_name,\
length,\
unban_time,\
reason,\
admin_name,\
admin_steamid
);

#if MAX_BANS 0
if( g_total_bans == MAX_BANS )
<
log_amx(«Ban list is full! (%i)», g_total_bans);
>
#endif
>

#if MAX_BANS > 0
RemoveBan(remove)
<
for( new i = remove; i = 60 )
<
minutes -= 60;
hours++;
>

while( hours >= 24 )
<
hours -= 24;
days++;
>

new bool:add_before;
if( minutes )
<
formatex(length, len, «%i минут», minutes, minutes == 1 ? «» : «»);

add_before = true;
>
if( hours )
<
if( add_before )
<
format(length, len, «%i час%а, %а», hours, hours == 1 ? «» : «а», length);
>
else
<
formatex(length, len, «%i час%(а,ов)», hours, hours == 1 ? «» : «(а,ов)»);

add_before = true;
>
>
if( days )
<
if( add_before )
<
format(length, len, «%i ден%ь, %ь», days, days == 1 ? «» : «ь», length);
>
else
<
formatex(length, len, «%i дн%(я,ей)», days, days == 1 ? «» : «(я,ей)»);

add_before = true;
>
>
if( !add_before )
<
// minutes, hours, and days = 0
// assume permanent ban
copy(length, len, «Бан навсегда»);
>
>

GenerateUnbanTime(const bantime, unban_time[], len)
<
static _hours[5], _minutes[5], _seconds[5], _month[5], _day[5], _year[7];
format_time(_hours, sizeof(_hours) — 1, «%H»);
format_time(_minutes, sizeof(_minutes) — 1, «%M»);
format_time(_seconds, sizeof(_seconds) — 1, «%S»);
format_time(_month, sizeof(_month) — 1, «%m»);
format_time(_day, sizeof(_day) — 1, «%d»);
format_time(_year, sizeof(_year) — 1, «%Y»);

new hours = str_to_num(_hours);
new minutes = str_to_num(_minutes);
new seconds = str_to_num(_seconds);
new month = str_to_num(_month);
new day = str_to_num(_day);
new year = str_to_num(_year);

while( minutes >= 60 )
<
minutes -= 60;
hours++;
>

while( hours >= 24 )
<
hours -= 24;
day++;
>

new max_days = GetDaysInMonth(month, year);
while( day > max_days )
<
day -= max_days;
month++;
>

while( month > 12 )
<
month -= 12;
year++;
>

formatex(unban_time, len, «%i:%02i:%02i %i/%i/%i», hours, minutes, seconds, month, day, year);
>

GetDaysInMonth(month, year=0)
<
switch( month )
<
case 1: return 31; // january
case 2: return ((year % 4) == 0) ? 29 : 28; // february
case 3: return 31; // march
case 4: return 30; // april
case 5: return 31; // may
case 6: return 30; // june
case 7: return 31; // july
case 8: return 31; // august
case 9: return 30; // september
case 10: return 31; // october
case 11: return 30; // november
case 12: return 31; // december
>

GetTargetFlags(client)
<
static const flags_no_immunity = (CMDTARGET_ALLOW_SELF|CMDTARGET_NO_BOTS);
static const flags_immunity = (CMDTARGET_ALLOW_SELF|CMDTARGET_NO_BOTS|CMDTARGET_OBEY_IMMUNITY);

switch( get_pcvar_num(ab_immunity) )
<
case 1: return flags_immunity;
case 2: return access(client, ADMIN_IMMUNITY) ? flags_no_immunity : flags_immunity;
>

GetMaxBanTime(client)
<
if( !g_total_maxban_times ) return 0;

new flags = get_user_flags(client);

for( new i = 0; i 0 )
<
GetBanTime(length, ban_length, sizeof(ban_length) — 1);
server_print(«%L: %s», client, «AB_BAN_LENGTH», ban_length);
>
server_print(«%L: %s», client, «AB_UNBAN_TIME», unban_time);
if( show_admin )
<
server_print(«%L: %s», client, «AB_ADMIN_NAME», admin_name);
server_print(«%L: %s», client, «AB_ADMIN_IP», admin_ip);
>
if( show_website )
<
get_pcvar_string(ab_website, website, sizeof(website) — 1);
if( website[0] )
<
server_print(«»);
server_print(«%L», client, «AB_WEBSITE»);
server_print(«%s», website);
>
>
server_print(«************************************************»);
>
else
<
client_cmd(client, «echo ^»************************************************^»»);
client_cmd(client, «echo ^»%L^»», client, «AB_BAN_INFORMATION»);
client_cmd(client, «echo ^»%L: %s^»», client, «AB_NAME», target_name);
client_cmd(client, «echo ^»%L: %s^»», client, IsValidAuthid(target_authid) ? «AB_STEAMID» : «AB_IP», target_authid);
client_cmd(client, «echo ^»%L: %s^»», client, «AB_REASON», reason);
if( length > 0 )
<
GetBanTime(length, ban_length, sizeof(ban_length) — 1);
client_cmd(client, «echo ^»%L: %s^»», client, «AB_BAN_LENGTH», ban_length);
>
client_cmd(client, «echo ^»%L: %s^»», client, «AB_UNBAN_TIME», unban_time);
if( show_website )
<
get_pcvar_string(ab_website, website, sizeof(website) — 1);
if( website[0] )
<
client_cmd(client, «echo ^»^»»);
client_cmd(client, «echo ^»%L^»», client, «AB_WEBSITE»);
client_cmd(client, «echo ^»%s^»», website);
>
>
client_cmd(client, «echo ^»************************************************^»»);
>
>

PrintActivity(const admin_name[], const message_fmt[], any. )
<
if( !get_playersnum() ) return;

new activity = get_pcvar_num(amx_show_activity);
if( !(0

не пойму что не так.
но скрины во время бана не делает

Источник статьи: http://amx-x.ru/viewtopic.php?t=32075

Читайте также:  Душ и баня в одном помещении на даче
Оцените статью
Про баню