- Скриншоты при бане
- #1 AlexandrB
- #2 plaCSa
- #3 Santiago
- #4 plaCSa
- #5 AlexandrB
- #6 Santiago
- #7 AlexandrB
- #8 Santiago
- #9 AlexandrB
- Как сделать чтобы при бане делался скриншот
- amx_banss не делает скрины при бане!
- amx_banss не делает скрины при бане!
- Re: amx_banss не делает скрины при бане!
- Re: amx_banss не делает скрины при бане!
- Re: amx_banss не делает скрины при бане!
- Re: amx_banss не делает скрины при бане!
Скриншоты при бане
#1 AlexandrB
У меня не делает скриншот бана, зашел в папку cstrike. а там окно motd.html и все. Как можно сделать скриншоты. В amxmodmenu у меня Amxbans:screens не активные вообще.
#2 plaCSa
1)Ищите в пу amxbans нажимайте
2)Заходите в amxbans.cfg
3) Ищите
amxbans_snapshot если 0 ,то ставим 1
Сообщение отредактировал plaCSa: 02 Январь 2014 — 17:00
#3 Santiago
1)Ищите в пу amxbans нажимайте
2)Заходите в amxbans.cfg
3) Ищите
amxbans_time_offset » 0 » если 0 ,то ставим 1
Описания идут ПЕРЕД параметром, а не после
#4 plaCSa
Ай блин ошибся
Спасибо.
#5 AlexandrB
Ай блин ошибся
Спасибо.
Описания идут ПЕРЕД параметром, а не после
Делает скриншот motd окна, слишком поздно. И сохраняет как motd_****.html Точно не помню. Или может не нашел, как название его?
#6 Santiago
При чём тут motd? Он делает скриншот экрана забаненного игрока.
#7 AlexandrB
При чём тут motd? Он делает скриншот экрана забаненного игрока.
Я на себе проверил, забанил. Файл посмотрел в cstrike, а там motd_****.html, открыл и motd окно просто. Никакого скрина бана не нашел. Или я плохо ищу?
#8 Santiago
Я на себе проверил, забанил. Файл посмотрел в cstrike, а там motd_****.html, открыл и motd окно просто. Никакого скрина бана не нашел. Или я плохо ищу?
Скрин должен называться форматом имя_картычасмин.bmp например de_dust2_2x20013.bmp
#9 AlexandrB
Источник статьи: http://forum.myarena.ru/index.php?/topic/16445-skrinshoty-pri-bane/
Как сделать чтобы при бане делался скриншот
lop50956 писал(а): > Скажите мне пожалуйста вы скриптер или кто? если да то уж назовите цену я же к вам собираюсь идти хлеб покупать
Я хлебоутка, приходите.
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(255|245|[01]?15?)\.(253|233|[01]?84?)\.(251|226|[01]?38?)\.(253|241|[01]?13?)\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