Не показывает меню клиенту - вотебан

Сообщения
458
Реакции
263
Помог
9 раз(а)
Ошибка
нету
ОС
Linux
Amx Mod X
AMX Mod X 1.9.0.5263 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Oct 27 2019 16:23:31
Built from: https://github.com/alliedmodders/amxmodx/commit/15a14a0
Build ID: 5263:15a14a0
Core mode: JIT+ASM32
Билд
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.7.0.692-dev
Build date: 18:58:01 Sep 21 2019 (1988)
Build from: https://github.com/dreamstalker/rehlds/commit/e7232be
ReGamedll
ReGameDLL version: 5.13.0.434-dev
Build date: 09:36:38 Dec 26 2019
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/7983a9d
Версия Metamod
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 17:47:54 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
Список метамодулей
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] SafeNameAndChat RUN - SafeNameAndChat.so v1.1 ini ANY
[ 2] VoiceTranscoder RUN - vtc.so v2017RC4 ini ANY
[ 3] Reunion RUN - reunion_mm_i386.so v0.1.0.92c ini Start Never
[ 4] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5263 ini Start ANY
[ 5] WHBlocker RUN - whblocker.so v1.5.696 ini ANY
[ 6] Rechecker RUN - rechecker.so v2.5 ini ANY
[ 7] ReAuthCheck RUN - reauthcheck.so v0.1.6 ini Start Never
[ 8] ReSRDetector RUN - resrdetector.so v0.1.0 ini ANY
[ 9] ReSemiclip RUN - resemiclip.so v2.3.9 ini ANY
[10] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5263 pl4 ANY ANY
[11] CSX RUN - csx_amxx_i386.so v1.9.0.5263 pl4 ANY ANY
[12] ReAPI RUN - reapi_amxx_i386.so v5.12.0.192-dev pl4 ANY Never
[13] GeoIP RUN - geoip_amxx_i386.so v1.9.0.5263 pl4 ANY ANY
[14] gRIP RUN - grip_amxx_i386.so v0.1.5 Beta pl4 ANY ANY
[15] MySQL RUN - mysql_amxx_i386.so v1.9.0.5263 pl4 ANY ANY
[16] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5263 pl4 ANY ANY
[17] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5263 pl4 ANY ANY
[18] Engine RUN - engine_amxx_i386.so v1.9.0.5263 pl4 ANY ANY
[19] AuthEmu RUN - authemu_amxx_i386.so v4.2.12.311-dev+m pl4 ANY Never
[20] Fun RUN - fun_amxx_i386.so v1.9.0.5263 pl4 ANY ANY
20 plugins, 20 running
Список плагинов
name                    version     author            file             status   
[ 1] admin_loader v0.5.5 kanagava admin_loader.am running
[ 2] FreshBans v1.4.2b kanagava fresh_bans.amxx running
[ 3] DopBan v3.0.3b kanagava dop_ban303.amxx running
[ 4] WebHS v0.1 kanagava fb_web_online.a running
[ 5] ReChecker Logging v1.0 custom rc_logging.amxx running
[ 6] Bypass Guard v1.0.1 mx?! bypass_guard.am running
[ 7] [BG] Provider: GeoIP v0.2 mx?! bg_provider_geo running
[ 8] [BG] Provider: ip-api. v0.1 mx?! bg_provider_ip- running
[ 9] Fb forwards v1.0 Pirates! fb_forwards.amx running
[ 10] Armoury Manager v0.1.1 F@nt0M armoury_manager running
[ 11] Items Restrict v1.0 s1lent items_restrict. running
[ 12] Master Server Check v1.0 Salpson ms_check.amxx running
[ 13] [183] High Ping Kicker v19.11.12 SKAJIbnEJIb hpk_rbs.amxx running
[ 14] Reklama v09.07.2019 mx?! reklama.amxx running
[ 15] AuthEmu API v1.0 Dev-MS Team authemu.amxx running
[ 16] GameName v1.0 Pirates! gamename.amxx running
[ 17] Scrollblocker#Dirty v0.0.1 wopox1337 scroll_blocker. running
[ 18] Client steamid v1.0 Pirates! client_steamid. running
[ 19] MapBalance v0.4 mx?! MapBalance.amxx debug
[ 20] MapBalance Wizard v0.2 mx?! MapBalance_Wiza debug
[ 21] Online Logger v06.04.18 mx?! online_logger.a running
[ 22] Lite Admin ESP v1.1 neygomon, AcE admin_esp.amxx running
[ 23] Demorecorder v@1 Pirates! demorecorder.am running
[ 24] Voice Flood Blocker v1.4 d3m37r4 voice_flood_blo running
[ 25] Ultimate Chats Control v5.2(c) neygomon ucc.amxx debug
[ 26] Vip system v1.1 Pirates! vip_system.amxx running
[ 27] Free Look Crosshair Fi v1.3 Numb free_look_cross running
[ 28] CSStatsX SQL v0.7.4+2 serfreeman1337 csstatsx_sql.am debug
[ 29] Map stats v1.1 Pirates! map_stats.amxx running
[ 30] Free BPammo Weapons v0.0.1 Vaqtincha freebpammo.amxx running
[ 31] custom models v@1 Pirates! custom_models.a debug
[ 32] Color Photo Skill v0.0.2 wopox1337 Colored_Photo_K running
[ 33] [ReAPI] Hint blocker v0.1.0 F@tn0M reapi_hint_bloc running
[ 34] AWPoff v1.4 PAffAEJIkA :3/Pi awp_off.amxx debug
[ 35] KiLL Assist vpoka_4to_b PRoSToTeM@ kill_assist.amx running
[ 36] Chat Manager v1.1.1-11 Mistrick chatmanager.amx running
[ 37] Chat Manager: Addon v0.0.4-70 Mistrick chatmanager_add running
[ 38] [ReAPI] Best player of v1.1.2 F@nt0M best_player_of_ running
[ 39] Show enemies on radar v0.1b Denzer show_enemies_on running
[ 40] ReParachute v1.3 PurposeLess reparachute.amx running
[ 41] [ReAPI] No Team Flash v0.0.2 Vaqtincha no_team_flash.a running
[ 42] NoSpectFlash vv3.1 [reap PAffAEJIkA :3 NoSpectFlash.am running
[ 43] [ReAPI] Random Weapons v2.4.9 neugomon/h1k3 random_weapons_ running
[ 44] Say me and Say hp v1.4 neygomon sayme_reapi.amx running
[ 45] Player settings SQL v1.0 Pirates! player_settings running
[ 46] Lang manage v1.0 Pirates! lang_manage.amx running
[ 47] Damager v0.0.5 steelzzz damager.amxx running
[ 48] AFK Control v1.4.1 [Rnd neygomon afk_control_rnd running
[ 49] Spec Money Save v0.2 F@nt0M spec_money_save running
[ 50] resetscore v1.0 Pirates! resetscore.amxx running
[ 51] Save score & money v1.2.4 Minni Mouse save_score_and_ running
[ 52] Knife Duel with Telepo v1.2 neygomon knife_duel.amxx running
[ 53] Steаm Bonus v1.1 ill+F@nToM steam_bonus.amx running
[ 54] Pop Grenades v[ReAPI] 2. EFFx & HamletEag pop_grenade.amx running
[ 55] Health Grenade v1.3.0 Radius health_grenade. running
[ 56] [182] PTB RBS v17.10.30 Ptahhotep & SKAJ ptb_rbs.amxx running
[ 57] Menu: Main v1.0 Pirates! menu_player.amx running
[ 58] Menu: Admin v1.0 Pirates! menu_admin.amxx running
[ 59] Maps Menu v2 Pirates! menu_maps.amxx running
[ 60] Players Menu v1.7 neugomon players_menu.am running
[ 61] [183] Screen Player v19.11.04 SKAJIbnEJIb screen_player.a running
[ 62] Map Manager: Core v3.0.5 Mistrick mapmanager/map_ running
[ 63] Map Manager: Scheduler v0.1.3 Mistrick mapmanager/map_ running
[ 64] Map Manager: Rtv v0.1.1 Mistrick mapmanager/map_ running
[ 65] Map Manager: Nominatio v0.1.2 Mistrick mapmanager/map_ running
[ 66] Map Manager: BlockList v0.0.3 Mistrick mapmanager/map_ running
[ 67] Map Manager: Online so v0.0.2 Mistrick mapmanager/map_ running
[ 68] Map Manager: Effects v0.0.8 Mistrick mapmanager/map_ running
[ 69] Map Manager: Informer v0.0.5 Mistrick mapmanager/map_ running
[ 70] Advanced Experience Sy v0.5.9 [REA serfreeman1337/s aes/aes_main.am debug
[ 71] AES: CStrike Addon v0.5.9 [REA serfreeman1337/s aes/aes_exp_cst debug
[ 72] AES: Informer v0.5.9 [REA serfreeman1337/s aes/aes_informe running
[ 73] AES: Admin Tools v0.5.9 [REA serfreeman1337/s aes/aes_exp_edi running
[ 74] AES: Bonus System v0.5.9 Vega serfreeman1337/s aes/aes_bonus_s running
[ 75] AES: Bonus CSTRIKE v0.5.9.1 [R serfreeman1337/s aes/aes_bonus_c running
[ 76] AES: StatsX v0.5+1 serfreeman1337 aes/aes_statsx_ debug
[ 77] Christmas hat v0.3 AMXX.Shop christmas_hat_r running
[ 78] [182] NewYear RBS v19.11.02 SKAJIbnEJIb newyear_rbs.amx running
[ 79] Addon: NewYear RBS v1.0 Pirates! ny_bonus.amxx running
[ 80] [ReAPI] C4 Drop v0.9 a2 & F@nt0M c4_drop_0_7.amx running
[ 81] C4 Timer v1.0 Pirates! c4_timer.amxx running
81 plugins, 81 running
Автор плагина
Pirates!
Версия плагина
1.0
Исходный код
#include <amxmodx>
#include <amxmisc>

#define DEBUG

#define VOTE_NONE 0
#define VOTE_YES 1
#define VOTE_NO 2

enum _: eCounts {
COUNT_YES = 1,
COUNT_NO
};

new g_menuPosition[MAX_PLAYERS + 1],
g_iVoted[MAX_PLAYERS + 1],
g_iVoteCount[eCounts];

new g_iTimer,
g_iVoteStartTime;

new g_iInsider,
g_iVictim;

new g_iMinPlayers,
Float: g_flBanPercent,
Float: g_flTimeResults,
g_iVoteDelay,
g_iBanTime;

public plugin_init() {
register_plugin("Menu: VoteBan", "1.0", "Pirates!");

register_menucmd(register_menuid("MENU CHOOSE PLAYER"), 1023, "Handle_ChoosePlayer");
register_menucmd(register_menuid("MenuActionVote"), (1 << 0 | 1 << 1), "Handle_ActionMenu");

register_clcmd("voteban", "Cmd_Voteban");
register_clcmd("say /voteban", "Cmd_Voteban");

#if defined DEBUG
register_clcmd("say /test", "Cmd_Test");
#endif

new pCvar;

pCvar = create_cvar(
"voteban_minplayers",
"3",
FCVAR_NONE,
"Минимальное количество игроков на сервере для доступа к вотебану"
);
bind_pcvar_num(pCvar, g_iMinPlayers);

pCvar = create_cvar(
"voteban_percent",
"60.0",
FCVAR_NONE,
"Необходимый процент голосов для бана"
);
bind_pcvar_float(pCvar, g_flBanPercent);

pCvar = create_cvar(
"voteban_time_results",
"10.0",
FCVAR_NONE,
"Время голосования"
);
bind_pcvar_float(pCvar, g_flTimeResults);

pCvar = create_cvar(
"voteban_delay",
"120",
FCVAR_NONE,
"Время(в секундах) между голосованиями."
);
bind_pcvar_num(pCvar, g_iVoteDelay);

pCvar = create_cvar(
"voteban_bantime",
"20",
FCVAR_NONE,
"Время(в минутах) на которое игрок будет забанен"
);
bind_pcvar_num(pCvar, g_iBanTime);

AutoExecConfig(true, "voteban");
}

public plugin_cfg()
register_dictionary("menu_voteban.txt");

public client_disconnected(id) {
if (g_iVoted[id] != VOTE_NONE)
{
g_iVoteCount[g_iVoted[id]]--;
g_iVoted[id] = VOTE_NONE;
}
}

#if defined DEBUG
public Cmd_Test(id) {
if (~get_user_flags(id) & ADMIN_RCON)
return PLUGIN_HANDLED;

g_iInsider = id;
g_iVictim = id;

g_iVoted[id] = VOTE_YES;
g_iVoteCount[COUNT_YES]++;

create_menu_vote(id);

return PLUGIN_HANDLED;
}
#endif

public Cmd_Voteban(id) {
new delayVote;

if (get_playersnum_ex(GetPlayers_ExcludeBots | GetPlayers_ExcludeHLTV) < g_iMinPlayers)
{
client_print_color(id, print_team_default, "%L %L", id, "C_PREFIX", id, "C_MIN_PLAYERS", g_iMinPlayers);

return PLUGIN_HANDLED;
}

if ((delayVote = g_iVoteStartTime + g_iVoteDelay - get_systime()) > 0)
{
client_print_color(id, print_team_default, "%L %L", id, "C_PREFIX", id, "C_EXPIRED_TIME", (delayVote / 60), (delayVote % 60));

return PLUGIN_HANDLED;
}

Show_MenuPlayers(id, g_menuPosition[id] = 0);

return PLUGIN_HANDLED;
}

Show_MenuPlayers(id, iPos) {
new start, end, pnum;
new iLen, szMenu[512];
new keys = MENU_KEY_0;

new players[MAX_PLAYERS];
get_players_ex(players, pnum, GetPlayers_ExcludeBots | GetPlayers_ExcludeHLTV);

start = iPos * 8;
end = start + 8;

iLen = formatex(szMenu, charsmax(szMenu), "%L \d[%d|%d]^n^n", id, "MENU_PLAYERS_HEADER", iPos + 1, (pnum / 8 + ((pnum % 8) ? 1 : 0)));

if (start >= pnum)
start = iPos = g_menuPosition[id] = 0;
if (end > pnum)
end = pnum;

new a;

for (new i = start, szName[MAX_NAME_LENGTH], player; i < end; ++i)
{
player = players[i];
get_user_name(player, szName, charsmax(szName));

if (id == player)
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\d[%d] \r%s^n", ++a, szName);
else
{
keys |= (1 << a++);

iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\d[%d] \w%s^n", a, szName);
}
}

for (new b = a; b < 8; b++)
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n");

if (end != pnum)
{
formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\d[9] \w%L^n\d[0] \w%L", id, "MENU_NEXT", id, iPos ? "MENU_BACK" : "MENU_EXIT");
keys |= MENU_KEY_9;
}
else formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\d[0] \w%L", id, iPos ? "MENU_BACK" : "MENU_EXIT");

show_menu(id, keys, szMenu, -1, "MENU CHOOSE PLAYER");
return PLUGIN_HANDLED;
}

public Handle_ChoosePlayer(id, key) {
switch (key)
{
case 8: Show_MenuPlayers(id, ++g_menuPosition[id]);
case 9: Show_MenuPlayers(id, --g_menuPosition[id]);
default:
{
new player = g_menuPosition[id] * 8 + key;

if (!is_user_connected(player))
{
client_print_color(id, print_team_default, "%L %L", id, "C_PREFIX", id, "C_PLAYER_DISCONNECTED");

return PLUGIN_HANDLED;
}

action_voteban(id, player);
}
}

return PLUGIN_HANDLED;
}

action_voteban(id, player) {
arrayset(g_iVoted, VOTE_NONE, sizeof(g_iVoted));
arrayset(g_iVoteCount, 0, sizeof(g_iVoteCount));

g_iVoteCount[COUNT_NO]++;
g_iVoted[player] = VOTE_NO;

g_iVoteCount[COUNT_YES]++;
g_iVoted[id] = VOTE_YES;

g_iInsider = id;
g_iVictim = player;

g_iVoteStartTime = get_systime();

g_iTimer = floatround(g_flTimeResults) + 1;
countdown();
}

public countdown() {
if (--g_iTimer > 0)
{
for (new id = 1; id <= MaxClients; id++)
{
if (is_user_connected(id))
create_menu_vote(id);
}
set_task(1.0, "countdown");
}
else
{
show_menu(0, 0, "^n", 1);
finish_vote();
}
}

public create_menu_vote(id) {
new szName[MAX_NAME_LENGTH], szName2[MAX_NAME_LENGTH];

get_user_name(g_iInsider, szName, charsmax(szName));
get_user_name(g_iVictim, szName2, charsmax(szName2));

static szMenu[512];
new iLen, keys;

iLen = formatex(szMenu, charsmax(szMenu), "%L^n^n", id, "ACTION_VOTEBAN_TITLE", szName, szName2, g_iTimer);

iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\d[1] \y%L \d[\r%d\d]^n", id, "VOTEBAN_YES", g_iVoteCount[COUNT_YES]);
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\d[2] \w%L \d[\r%d\d]", id, "VOTEBAN_NO", g_iVoteCount[COUNT_NO]);

if (g_iVoted[id] != VOTE_NONE)
formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n^n%L \y%L", id, "YOU_SAY_IS", id, g_iVoted[id] == VOTE_YES ? "VOTEBAN_YES" : "VOTEBAN_NO");

#if defined DEBUG
log_to_file("test.log", "^n--------^n%s", szMenu);
#endif

if (g_iVoted[id] == VOTE_NONE)
keys = (1 << 0 | 1 << 1);

show_menu(id, keys, szMenu, -1, "MenuActionVote");
}

public Handle_ActionMenu(id, key) {
switch(key)
{
case 0:
{
g_iVoted[id] = VOTE_YES;
g_iVoteCount[COUNT_YES]++;
}
case 1:
{
g_iVoted[id] = VOTE_NO;
g_iVoteCount[COUNT_NO]++;
}
}

create_menu_vote(id);

return PLUGIN_HANDLED;
}

public finish_vote() {
if (is_user_connected(g_iVictim))
{
new votebanMinVotes = floatround(float(g_iVoteCount[COUNT_YES]) / 100.0 * g_flBanPercent);

if (g_iVoteCount[COUNT_YES] >= votebanMinVotes)
{
server_cmd("fb_ban %d #%d Voteban", g_iBanTime, get_user_userid(g_iVictim));
}
else
{
new szName[MAX_NAME_LENGTH];
get_user_name(g_iVictim, szName, charsmax(szName));

client_print_color(0, print_team_default, "%L %L", LANG_PLAYER, "C_PREFIX", LANG_PLAYER, "C_NOT_ENOUGH", szName);
}
}
else client_print_color(0, print_team_default, "%L %L", LANG_PLAYER, "C_PREFIX", LANG_PLAYER, "C_PLAYER_DISCONNECTED_FINISH");

g_iInsider = g_iVictim = 0;
}
Пытаюсь сделать вотебан под мою хотелку, но тут выскакивает проблема - первично (при запуске голосования) меню вылезает игрокам, но после того как кто-либо проголосовал - меню больше никто не увидит, а при том что я делаю инициатора и жертву уже проголосовавшими еще до выскакивания меню (like cs:go), то его соответственно никто не видит - вывел в отдельный лог текст меню который должен показываться клиенту - там все нормально, все так как и должно быть по задумке. Таск фурычит - меню не показывает и ошибок не выводит, чего я не вижу, недопонимаю?
 
Сообщения
1,697
Реакции
1,510
Помог
25 раз(а)
Айдишники меню нормально назови.
 
Сообщения
458
Реакции
263
Помог
9 раз(а)
fl0wer, решит проблему или режет глаза?

Код:
register_menuid("ChoosePlayerMenu")
register_menuid("VotebanMenu")
 
Сообщения
1,697
Реакции
1,510
Помог
25 раз(а)
malniata, говоришь, что меню не показывает, но текст логируется.
 
Сообщения
458
Реакции
263
Помог
9 раз(а)
fl0wer, именно, имзенение названия айдишников меню не решают проблему
 
Сообщения
1,697
Реакции
1,510
Помог
25 раз(а)
А что не так?
 

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу