Участник
Пользователь
- Сообщения
- 264
- Реакции
- 80
- Помог
- 1 раз(а)
- Ошибка
-
Нету ошибок
- ОС
- Linux
- Билд
-
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.3.0.605-dev
Build date: 22:55:56 Nov 8 2017 (1306)
Build from: https://github.com/dreamstalker/rehlds/commit/dab2663
- ReGamedll
-
ReGameDLL version: 5.3.0.275-dev
Build date: 16:51:10 Nov 27 2017
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/519a731
- Список метамодулей
-
description stat pend file vers src load unlod
[ 1] VoiceTranscoder RUN - voicetranscoder. v2017RC3 ini ANY ANY
[ 2] Reunion RUN - reunion_mm_i386. v0.1.75 ini Start Never
[ 3] ReAuthCheck RUN - reauthcheck_mm_i v0.1.6 ini Start Never
[ 4] Rechecker RUN - rechecker_mm_i38 v2.5 ini Chlvl ANY
[ 5] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9 ini Chlvl ANY
[ 6] ReSRDetector RUN - resrdetector_mm_ v0.1.0 ini Chlvl ANY
[ 7] WHBlocker RUN - whblocker_mm_i38 v1.5.695 ini Chlvl ANY
[ 8] AMX Mod X RUN - amxmodx_mm_i386. v1.8.3-R ini Start ANY
[ 9] CStrike RUN - cstrike_amxx_i38 v1.8.3-R pl8 ANY ANY
[10] CSX RUN - csx_amxx_i386.so v1.8.3-R pl8 ANY ANY
[11] Engine RUN - engine_amxx_i386 v1.8.3-R pl8 ANY ANY
[12] FakeMeta RUN - fakemeta_amxx_i3 v1.8.3-R pl8 ANY ANY
[13] Ham Sandwich RUN - hamsandwich_amxx v1.8.3-R pl8 ANY ANY
[14] SQLite RUN - sqlite_amxx_i386 v1.8.3-R pl8 ANY ANY
[15] ReAPI RUN - reapi_amxx_i386. v5.2.0.1 pl8 ANY Never
[16] ReAimDetector RUN - reaimdetector_am v0.2.0 pl8 ANY Never
16 plugins, 16 running
- Список плагинов
-
name version author file status
[ 1] Lite Recoder 1.0.1 neygomon recoder.amxx running
[ 2] Advanced Gag 1.9.0 neygomon amx_gag.amxx running
[ 3] Adverts 1.0 pUzzlik adverts_message running
[ 4] Mode 2x2 2.5re s1lent mode.amxx running
[ 5] FreshBans 1.3.8b kanagava fresh_bans.amxx running
[ 6] Lite VoteBan 1.4 neygomon lite_voteban.am running
[ 7] Admin Base 1.8.3-Re AMXX Dev Team admin.amxx running
[ 8] Admin Commands 1.8.3-Re AMXX Dev Team admincmd.amxx running
[ 9] Menus Front-End 1.5 neygomon menufront_end.a running
[ 10] Players Menu 1.7 neugomon players_menu.am running
[ 11] Maps Menu 1.8.3-Re AMXX Dev Team mapsmenu.amxx running
[ 12] Lite MapChooser 2.6 neygomon mapchooser.amxx running
[ 13] [ReAPI] AdminFreeLook 1.0 ReHLDS Team adminfreelook.a running
[ 14] Change Team 1.1 neygomon changeteam.amxx running
[ 15] Auto Restart 1.0.3 neygomon auto_rr.amxx stopped
[ 16] Ping Control 1.31 neygomon ping_control.am running
[ 17] AFK Control 1.4.1 [Rnd neygomon afk_control.amx running
[ 18] AES: StatsX 0.5.1 Vega serfreeman1337 aes_statsx_cstr running
[ 19] Lite Rank System 1.5 [ReHLD AcE re_lrs_csstats. running
[ 20] Say me and Say hp 1.4 neygomon sayme_reapi.amx running
[ 21] First Killer Bonus 0.0.1f wopox1337 firstkillerbonu running
[ 22] RE ResetScore 1.0 neygomon, Phanto resetscore.amxx running
[ 23] Lite Damager 0.1 AcE lite_damager.am running
[ 24] RE Vampire 1.0.5 AcE, REVO re_vampire.amxx running
[ 25] Killer ScreenFade 0.0.5 Vaqtincha reapi_killer_sc running
[ 26] Drop Pistols on Death 0.0.4 Vaqtincha reapi_dead_pist running
[ 27] [ReAPI] No Team Flash 0.0.2 Vaqtincha no_team_flash.a running
[ 28] C4 Timer on roundtime 0.3.3a neygomon bomb_timer.amxx running
[ 29] Steam Bonus 1.1 ill+F@nToM steam_bonus.amx running
[ 30] Lite AwpLimit 1.09 neygomon lite_awp_limit. running
[ 31] VIP info | Connect/TAB 0.0.3 REVO vip_info.amxx running
[ 32] Lite Vip System 1.3 Hypa_[KZ] lite_vip_system running
[ 33] Addon Skin System 1.3 REVO wss_addon.amxx running
[ 34] Weapon Skin System 0.6.0-50 Mistrick weapon_skin_sys running
[ 35] Menu System 0.1.2 serfreeman1337 menusystem.amxx running
[ 36] Items Restrict 1.0 s1lent items_restrict. running
[ 37] Block Grenade Info 1.0 neygomon block_grenadein running
[ 38] Block HudHelp 1.1 REVO block_hudhelp.a running
[ 39] Replace Info Message 2.3 maeStro aka 9iky replace_info_ms running
[ 40] SteamID Limiter 0.4 Mistrick steamid_limiter running
[ 41] Voice protection 0.3 AMXX.Shop voice_protectio running
[ 42] ReAimDetector API 0.2.0 ReHLDS Team reaimdetector.a running
[ 43] Lite Chat 1.0 AcE lite_chat.amxx running
43 plugins, 42 running
- Исходный код
-
#include <amxmodx>
#tryinclude <reapi>
#if !defined _reapi_included
#include <VtcApi>
#endif
#if AMXX_VERSION_NUM < 183
#include <colorchat>
#endif
#define SORRY // Разрешить команду /sorry для извинения игроков
#define MUTEMENU // Поддержка команды /mute
#define GAG_ACCESS ADMIN_BAN // Доступ к функциям гага
#define SORRYTIME 60 // Как часто можно пользоваться командой /sorry. Время в секундах
#define PREFIX "GAG" // Префикс в чате
#define SUPERADMIN ADMIN_RCON // Админ с флагом L может гагать других админов с иммунитетом
new g_BlockTimes[] = // Время блокировки в минутах
{
5,
10,
30,
60,
0 // навсегда
}
new g_AllowCommands[][] = // Разрешенные команды
{
"/mode",
"/menu",
"/maps_menu",
"/stats_menu",
"/set_menu",
"/rs",
"/me",
"/hp",
"/top",
"/rank",
"/rankstats",
"/hot",
"/stats",
"/statsme",
"/fade",
"/lrshud",
"/lws",
"/wss",
"/ak47",
"/m4a1",
"/skinreset",
"/maps",
"/rtv",
"/voteban"
}
/* Словарь плагина */
#define MSG_SORRY_FLOOD "^1[^4%s^1] ^3Прекратите флудить! ^4Повторно извиниться можно через ^3%d сек"
#define MSG_SORRY_ADMIN "^1[^4%s^1] ^4Уважаемый ^3адмнистратор^4, игрок ^3%s ^4просит снять с него ^3GAG^4!"
#define MSG_CHAT_IS_BLOCKED "^1[^4%s^1] ^4Уважаемый ^3%s^4, Ваш чат ^3заблокирован^4!"
#define MSG_BLOCK_EXPIRED_TIME "^1[^4%s^1] ^4До разблокировки осталось ^1примерно ^3%d ^4мин."
#define MSG_BLOCK_EXPIRED "^1[^4%s^1] ^4Время блокировки ^3истекло^4. ^1Подождите обновления информации ..."
#define MSG_SAY_SORRY "^1[^4%s^1] ^4Чтобы извиниться, напишите в чат ^3/sorry^4. Возможно, разблокируют раньше :)"
#define MSG_CHAT_UNBLOCK_ALL "^1[^4%s^1] ^4Игроку ^3%s ^4был разблокирован чат администратором ^3%s"
#define MSG_CHAT_UNBLOCK_PL "^1[^4%s^1] ^4Уважаемый ^3%s^4, администратор ^3%s ^4снял с Вас блокировку чата"
#define MSG_CHAT_BLOCK_ALL "^1[^4%s^1] ^4Администратор ^3%s ^4заблокировал чат игроку ^3%s ^1%s"
#define MSG_CHAT_BLOCK_PL "^1[^4%s^1] ^4Уважаемый ^3%s^4, администратор ^3%s ^4заблокировал Вам чат ^1%s"
#define MSG_MUTE_ALL_PLAYERS "^1[^4%s^1] ^4Вы установили mute на ^3всех ^4игроков."
#define MSG_UNMUTE_ALL_PLAYERS "^1[^4%s^1] ^4Вы сняли mute со ^3всех ^4игроков."
#define MSG_UNMUTE_PLAYER "^1[^4%s^1] ^4Вы сняли ^3mute ^4с игрока ^3%s^4."
#define MSG_MUTE_PLAYER "^1[^4%s^1] ^4Вы установили ^3mute ^4на игрока ^3%s^4."
/* Технические данные */
#if defined MUTEMENU
#include <fakemeta>
#endif
#define STORAGE "addons/amxmodx/data/amx_gag.dat"
#define MAX_ITEMS 1000
#if !defined MAX_PLAYERS
const MAX_PLAYERS = 32;
#endif
#define GetBit(%1,%2) (%1 & (1 << (%2 & 31)))
#define SetBit(%1,%2) %1 |= (1 << (%2 & 31))
#define ResetBit(%1,%2) %1 &= ~(1 << (%2 & 31))
enum _:DATA
{
IP[16],
STEAMID[25],
BLOCKTIME
};
enum MENUS
{
GAG,
MUTE
};
enum _:MENU_SETTINGS
{
Menu,
SelectTime,
Pos
};
new g_bitBlockChats;
new g_aLoadedData[MAX_PLAYERS + 1][DATA];
new Trie:g_tAllowCmds, Array:g_aUsersBlocked;
new g_arrData[DATA];
new pl[MAX_PLAYERS], pnum;
new g_iMutePlayer[MAX_PLAYERS + 1][MAX_PLAYERS + 1];
new g_arrPlayers[MAX_PLAYERS + 1][MAX_PLAYERS];
new g_iMenuInfo[MAX_PLAYERS + 1][MENU_SETTINGS];
public plugin_init()
{
#define VERSION "1.9.0"
register_plugin("Advanced Gag", VERSION, "neygomon");
register_cvar("adv_gag", VERSION, FCVAR_SERVER | FCVAR_SPONLY);
#if defined _reapi_included
if(has_vtc())
{
register_clcmd("amx_gagmenu", "ClCmdGagMenu");
}
#if !defined MUTEMENU
else set_fail_state("Needed meta plugin VTC [https://neugomon.ru/threads/257/]");
#endif
#else
register_clcmd("amx_gagmenu", "ClCmdGagMenu");
#endif
#if defined MUTEMENU
register_clcmd("say /mute", "ClCmdMuteMenu");
register_clcmd("say_team /mute", "ClCmdMuteMenu");
register_forward(FM_Voice_SetClientListening, "SetClientListening_Pre", false);
#endif
#if defined SORRY
register_clcmd("say /sorry", "SaySorry");
register_clcmd("say_team /sorry", "SaySorry");
#endif
register_clcmd("say", "SayChat");
register_clcmd("say_team", "SayChat");
register_srvcmd("adv_flush_gags", "SrvCmdFlush");
register_menucmd(register_menuid("AdvGag Menu"), 1023, "MenuHandler");
set_task(60.0, "CheckBlockedUsers", .flags = "b");
}
public plugin_cfg()
{
g_aUsersBlocked = ArrayCreate(DATA);
new fp = fopen(STORAGE, "rt");
if(fp)
{
new i, blocktime[15], buffer[128];
new sys = get_systime();
while(!feof(fp) && i < MAX_ITEMS)
{
fgets(fp, buffer, charsmax(buffer));
trim(buffer);
if(buffer[0] == EOS || buffer[0] == ';')
continue;
if(parse(buffer,
g_arrData[IP], charsmax(g_arrData[IP]),
g_arrData[STEAMID], charsmax(g_arrData[STEAMID]),
blocktime, charsmax(blocktime)
)
)
{
g_arrData[BLOCKTIME] = str_to_num(blocktime);
if(!g_arrData[BLOCKTIME] || g_arrData[BLOCKTIME] > sys)
{
ArrayPushArray(g_aUsersBlocked, g_arrData);
i++;
}
}
}
fclose(fp);
}
g_tAllowCmds = TrieCreate();
for(new i; i < sizeof g_AllowCommands; ++i)
TrieSetCell(g_tAllowCmds, g_AllowCommands[i], i);
}
public client_putinserver(id)
{
if(!is_user_bot(id) && !is_user_hltv(id))
{
get_user_ip(id, g_aLoadedData[id][IP], charsmax(g_aLoadedData[][IP]), 1);
get_user_authid(id, g_aLoadedData[id][STEAMID], charsmax(g_aLoadedData[][STEAMID]));
if(IsUserBlocked(id, g_aLoadedData[id][IP], g_aLoadedData[id][STEAMID]) != -1)
{
VTC_MuteClient(id);
SetBit(g_bitBlockChats, id);
}
else ResetBit(g_bitBlockChats, id);
arrayset(g_iMutePlayer[id], 0, sizeof g_iMutePlayer[]);
}
}
#if defined MUTEMENU
public SetClientListening_Pre(iReciever, iSender)
{
if(iSender != iReciever)
{
if(g_iMutePlayer[iReciever][iSender])
{
engfunc(EngFunc_SetClientListening, iReciever, iSender, false);
forward_return(FMV_CELL, false);
return FMRES_SUPERCEDE;
}
}
return FMRES_IGNORED;
}
#endif
public SaySorry(id)
{
if(GetBit(g_bitBlockChats, id))
{
static iFloodTime[33], systime;
if(iFloodTime[id] > (systime = get_systime()))
ChatColor(id, 0, MSG_SORRY_FLOOD, PREFIX, iFloodTime[id] - systime);
else
{
new sName[32];
get_user_name(id, sName, charsmax(sName));
get_players(pl, pnum, "ch");
for(new i; i < pnum; ++i)
{
if(get_user_flags(pl[i]) & GAG_ACCESS)
ChatColor(pl[i], 0, MSG_SORRY_ADMIN, PREFIX, sName);
}
iFloodTime[id] = systime + SORRYTIME;
}
}
return PLUGIN_HANDLED;
}
public SayChat(id)
{
if(!GetBit(g_bitBlockChats, id))
return PLUGIN_CONTINUE;
new sMessage[128];
read_args(sMessage, charsmax(sMessage));
remove_quotes(sMessage);
if(TrieKeyExists(g_tAllowCmds, sMessage))
return PLUGIN_CONTINUE;
else
{
new sName[32], ost;
get_user_name(id, sName, charsmax(sName));
ChatColor(id, 0, MSG_CHAT_IS_BLOCKED, PREFIX, sName);
if(g_aLoadedData[id][BLOCKTIME])
{
if((ost = g_aLoadedData[id][BLOCKTIME] - get_systime()) / 60 > 0)
ChatColor(id, 0, MSG_BLOCK_EXPIRED_TIME, PREFIX, ost / 60);
else ChatColor(id, 0, MSG_BLOCK_EXPIRED, PREFIX);
}
ChatColor(id, 0, MSG_SAY_SORRY, PREFIX);
}
return PLUGIN_HANDLED;
}
public SrvCmdFlush()
{
ArrayClear(g_aUsersBlocked);
log_amx("Advanced Gag [v %s] flush gags", VERSION);
for(new id; id < sizeof g_aLoadedData; ++id)
{
arrayset(g_aLoadedData[id], 0, sizeof g_aLoadedData[]);
ResetBit(g_bitBlockChats, id);
}
}
public CheckBlockedUsers()
{
if(ArraySize(g_aUsersBlocked))
{
get_players(pl, pnum);
for(new i, sys = get_systime(); i < pnum; ++i)
{
if(g_aLoadedData[pl[i]][BLOCKTIME] && sys > g_aLoadedData[pl[i]][BLOCKTIME])
UserBlock(pl[i], 0);
}
}
}
public ClCmdGagMenu(id)
{
if(get_user_flags(id) & GAG_ACCESS)
{
g_iMenuInfo[id][SelectTime] = 0;
g_iMenuInfo[id][Pos] = 0;
g_iMenuInfo[id][Menu] = any:GAG;
ShowMenu(id, 0);
}
return PLUGIN_HANDLED;
}
public ClCmdMuteMenu(id)
{
g_iMenuInfo[id][Pos] = 0;
g_iMenuInfo[id][Menu] = any:MUTE;
ShowMenu(id, 0);
return PLUGIN_HANDLED;
}
ShowMenu(id, iPos)
{
new start, end;
new iLen, sMenu[512];
new iKeys = MENU_KEY_0|MENU_KEY_8;
get_players(g_arrPlayers[id], pnum, "ch");
switch(g_iMenuInfo[id][Menu])
{
case GAG:
{
start = iPos * 7;
end = start + 7;
iLen = formatex(sMenu, charsmax(sMenu), "\yВыберите игрока\w\R%d/%d^n^n", iPos + 1, (pnum / 7 + ((pnum % 7) ? 1 : 0)));
}
case MUTE:
{
start = iPos * 6;
end = start + 6;
iKeys |= MENU_KEY_7;
iLen = formatex(sMenu, charsmax(sMenu), "\yВыберите игрока\w\R%d/%d^n^n", iPos + 1, (pnum / 6 + ((pnum % 6) ? 1 : 0)));
}
}
if(start >= pnum)
start = iPos = g_iMenuInfo[id][Pos] = 0;
if(end > pnum)
end = pnum;
switch(g_iMenuInfo[id][Menu])
{
case GAG:
{
#if defined SUPERADMIN
for(new i = start, bool:superadmin = bool:(get_user_flags(id) & SUPERADMIN), sName[32], plr, a; i < end; ++i)
#else
for(new i = start, sName[32], plr, a; i < end; ++i)
#endif
{
plr = g_arrPlayers[id][i];
get_user_name(plr, sName, charsmax(sName));
if(id == plr)
iLen += formatex(sMenu[iLen], charsmax(sMenu) - iLen, "\r%d. \d%s \y[\rЭто Вы\y]^n", ++a, sName);
#if defined SUPERADMIN
else if(!superadmin && get_user_flags(plr) & ADMIN_IMMUNITY)
#else
else if(get_user_flags(plr) & ADMIN_IMMUNITY)
#endif
iLen += formatex(sMenu[iLen], charsmax(sMenu) - iLen, "\r%d. \d%s \y[\rImmunity\y]^n", ++a, sName);
else
{
iKeys |= (1 << a++);
if(GetBit(g_bitBlockChats, plr))
iLen += formatex(sMenu[iLen], charsmax(sMenu) - iLen, "\r%d. \w%s \^n", a, sName);
else iLen += formatex(sMenu[iLen], charsmax(sMenu) - iLen, "\r%d. \w%s%s^n", a, sName, VTC_IsClientSpeaking(plr) ? " \d[\rSpeaking\d]" : "");
}
}
if(!g_BlockTimes[g_iMenuInfo[id][SelectTime]])
iLen += formatex(sMenu[iLen], charsmax(sMenu) - iLen, "^n\r8. \wGag\d'\wнуть \rнавсегда^n^n");
else iLen += formatex(sMenu[iLen], charsmax(sMenu) - iLen, "^n\r8. \wGag\d'\wнуть на \y%d \wмин^n^n", g_BlockTimes[g_iMenuInfo[id][SelectTime]]);
}
case MUTE:
{
for(new i = start, sName[32], plr, a; i < end; ++i)
{
plr = g_arrPlayers[id][i];
get_user_name(plr, sName, charsmax(sName));
if(id == plr)
iLen += formatex(sMenu[iLen], charsmax(sMenu) - iLen, "\r%d. \d%s \y[\rЭто Вы\y]^n", ++a, sName);
else
{
iKeys |= (1 << a++);
iLen += formatex(sMenu[iLen], charsmax(sMenu) - iLen, "\r%d. \w%s%s^n", a, sName, g_iMutePlayer[id][plr] ? " \d[\yMuted\d]" : "");
}
}
iLen += formatex(sMenu[iLen], charsmax(sMenu) - iLen, "^n\r7. \wЗаглушить \rвсех^n\r8. \wСнять Mute со \rвсех^n^n");
}
}
if(end != pnum)
{
formatex(sMenu[iLen], charsmax(sMenu) - iLen, "\r9. \yДалее^n\r0. \r%s", iPos ? "Назад" : "Выход");
iKeys |= MENU_KEY_9;
}
else formatex(sMenu[iLen], charsmax(sMenu) - iLen, "\r0. \r%s", iPos ? "Назад" : "Выход");
show_menu(id, iKeys, sMenu, -1, "AdvGag Menu");
return PLUGIN_HANDLED;
}
public MenuHandler(id, iKey)
{
switch(iKey)
{
case 6:
{
switch(g_iMenuInfo[id][Menu])
{
case GAG:
{
GagHandler(id, g_arrPlayers[id][g_iMenuInfo[id][Pos] * 7 + iKey], g_BlockTimes[g_iMenuInfo[id][SelectTime]]);
}
case MUTE:
{
arrayset(g_iMutePlayer[id], 1, sizeof g_iMutePlayer[]);
ChatColor(id, 0, MSG_MUTE_ALL_PLAYERS, PREFIX);
}
}
}
case 7:
{
switch(g_iMenuInfo[id][Menu])
{
case GAG:
{
if(++g_iMenuInfo[id][SelectTime] > charsmax(g_BlockTimes))
g_iMenuInfo[id][SelectTime] = 0;
ShowMenu(id, g_iMenuInfo[id][Pos]);
}
case MUTE:
{
arrayset(g_iMutePlayer[id], 0, sizeof g_iMutePlayer[]);
ChatColor(id, 0, MSG_UNMUTE_ALL_PLAYERS, PREFIX);
}
}
}
case 8: ShowMenu(id, ++g_iMenuInfo[id][Pos]);
case 9:
{
if(g_iMenuInfo[id][Pos])
ShowMenu(id, --g_iMenuInfo[id][Pos]);
}
default:
{
switch(g_iMenuInfo[id][Menu])
{
case GAG:
{
GagHandler(id, g_arrPlayers[id][g_iMenuInfo[id][Pos] * 7 + iKey], g_BlockTimes[g_iMenuInfo[id][SelectTime]]);
}
case MUTE:
{
MuteHandler(id, g_arrPlayers[id][g_iMenuInfo[id][Pos] * 6 + iKey]);
}
}
}
}
return PLUGIN_HANDLED;
}
GagHandler(id, player, blocktime)
{
if(!is_user_connected(player))
{
return;
}
new sNameAdmin[32], sNamePlayer[32];
get_user_name(id, sNameAdmin, charsmax(sNameAdmin));
get_user_name(player, sNamePlayer, charsmax(sNamePlayer));
if(GetBit(g_bitBlockChats, player))
{
UserBlock(player, 0);
ChatColor(0, player, MSG_CHAT_UNBLOCK_ALL, PREFIX, sNamePlayer, sNameAdmin);
ChatColor(player, 0, MSG_CHAT_UNBLOCK_PL, PREFIX, sNamePlayer, sNameAdmin);
}
else
{
UserBlock(player, 1, blocktime);
new blocktimeinfo[32];
if(!blocktime)
formatex(blocktimeinfo, charsmax(blocktimeinfo), "навсегда");
else formatex(blocktimeinfo, charsmax(blocktimeinfo), "на %d минут", blocktime);
ChatColor(0, player, MSG_CHAT_BLOCK_ALL, PREFIX, sNameAdmin, sNamePlayer, blocktimeinfo);
ChatColor(player, 0, MSG_CHAT_BLOCK_PL, PREFIX, sNamePlayer, sNameAdmin, blocktimeinfo);
}
ShowMenu(id, g_iMenuInfo[id][Pos]);
}
MuteHandler(id, player)
{
if(!is_user_connected(player))
{
return;
}
new sNamePlayer[32];
get_user_name(player, sNamePlayer, charsmax(sNamePlayer));
g_iMutePlayer[id][player] = !g_iMutePlayer[id][player];
ChatColor(id, 0, g_iMutePlayer[id][player] ? MSG_MUTE_PLAYER : MSG_UNMUTE_PLAYER, PREFIX, sNamePlayer);
ShowMenu(id, g_iMenuInfo[id][Pos]);
}
UserBlock(id, block, btime = 0)
{
if(block)
{
g_aLoadedData[id][BLOCKTIME] = !btime ? 0 : get_systime() + btime * 60;
ArrayPushArray(g_aUsersBlocked, g_aLoadedData[id]);
SetBit(g_bitBlockChats, id);
VTC_MuteClient(id);
client_cmd(id, "-voicerecord"); // типа отключаем войс, ога
}
else IsUserBlocked(id, g_aLoadedData[id][IP], g_aLoadedData[id][STEAMID], 1);
}
IsUserBlocked(id, const Ip[], const SteamID[], UnBlock = 0)
{
new i, aSize = ArraySize(g_aUsersBlocked), sys = get_systime();
if(UnBlock)
{
for(i = 0; i < aSize; ++i)
{
ArrayGetArray(g_aUsersBlocked, i, g_arrData);
if(strcmp(g_arrData[IP], Ip) == 0 || strcmp(g_arrData[STEAMID], SteamID) == 0)
{
ArrayDeleteItem(g_aUsersBlocked, i);
ResetBit(g_bitBlockChats, id);
VTC_UnmuteClient(id);
break;
}
}
}
else
{
for(i = 0; i < aSize; ++i)
{
ArrayGetArray(g_aUsersBlocked, i, g_arrData);
if(strcmp(g_arrData[IP], Ip) == 0 || strcmp(g_arrData[STEAMID], SteamID) == 0)
{
if(!g_arrData[BLOCKTIME] || g_arrData[BLOCKTIME] > sys)
{
g_aLoadedData[id][BLOCKTIME] = g_arrData[BLOCKTIME];
return i;
}
else ArrayDeleteItem(g_aUsersBlocked, i);
break;
}
}
}
return -1;
}
public plugin_end()
{
if(file_exists(STORAGE))
unlink(STORAGE);
new aSize, fp = fopen(STORAGE, "w+");
if(!fprintf(fp, "; File generated by Advanced Gag [v %s][neygomon | https://neugomon.ru/threads/91/]^n^n", VERSION))
{
new err[128]; formatex(err, charsmax(err), "Plugin not write file %s! Users not saved!", STORAGE);
set_fail_state(err);
}
aSize = ArraySize(g_aUsersBlocked);
for(new i; i < aSize; ++i)
{
ArrayGetArray(g_aUsersBlocked, i, g_arrData);
fprintf(fp, "^"%s^" ^"%s^" ^"%d^"^n", g_arrData[IP], g_arrData[STEAMID], g_arrData[BLOCKTIME]);
}
if(aSize)
{
log_amx("Successfully saved %d items in %s :)", aSize, STORAGE);
}
fclose(fp);
ArrayDestroy(g_aUsersBlocked);
TrieDestroy(g_tAllowCmds);
}
stock ChatColor(id, id2, const szMessage[], any:...)
{
new szMsg[190];
vformat(szMsg, charsmax(szMsg), szMessage, 4);
if(id && id != id2)
{
client_print_color(id, print_team_default, szMsg);
}
else
{
get_players(pl, pnum, "c");
for(new i; i < pnum; ++i)
{
if(pl[i] != id2)
{
client_print_color(pl[i], print_team_default, szMsg);
}
}
}
}
Суть бага такова, что когда я выдаю гаг, а потом листаю дальше меню, список едет.
Подскажите пожалуйста, как мне это исправить? Или может у кого уже было нечто подобное?
Подскажите пожалуйста, как мне это исправить? Или может у кого уже было нечто подобное?
В этой теме было размещено решение! Перейти к решению.
Вложения
-
275 KB Просмотры: 704