Баг с QuestMenu

Сообщения
17
Реакции
-1
Ошибка
Ошибок нету.
ОС
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)
Exe build: 13:12:29 Aug 29 2013 (6153)
ReGamedll
Отсутствует.
Версия 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] LocalizeBug Fix RUN - localizebugfix.so v2.4 ini Start Never
[ 2] dproto_EF RUN - dproto.so v0.9.582 ini Start Never
[ 3] AMX Mod X RUN - amxmodx.so v1.9.0.5263 ini Start ANY
[ 4] VoiceTranscoder RUN - vtc.so v2017RC5 ini ANY
[ 5] Ultimate Unprecacher RUN - unprecacher_i386.so vBeta 2.5.3 ini Chlvl Chlvl
[ 6] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5263 pl3 ANY
[ 7] CSX RUN - csx_amxx_i386.so v1.9.0.5263 pl3 ANY
[ 8] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5263 pl3 ANY
[ 9] MySQL RUN - mysql_amxx_i386.so v1.9.0.5263 pl3 ANY
[10] Fun RUN - fun_amxx_i386.so v1.9.0.5263 pl3 ANY ANY
[11] Engine RUN - engine_amxx_i386.so v1.9.0.5263 pl3 ANY ANY
[12] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5263 pl3 ANY ANY
12 plugins, 12 running
Список плагинов
Currently loaded plugins:
name version author file status
[ 1] Admin Loader v3.5 neygomon admin_loader.am running
[ 2] FreshBans v1.4.5b kanagava fresh_bans.amxx running
[ 3] Admin Chat v1.9.0.5263 AMXX Dev Team adminchat.amxx running
[ 4] Admin Commands v1.9.0.5263 AMXX Dev Team admincmd.amxx running
[ 5] Commands Menu v1.9.0.5263 AMXX Dev Team cmdmenu.amxx running
[ 6] Info. Messages v1.9.0.5263 AMXX Dev Team imessage.amxx running
[ 7] Menus Front-End v1.9.0.5263 AMXX Dev Team menufront.amxx running
[ 8] Plugin Menu v1.9.0.5263 AMXX Dev Team pluginmenu.amxx running
[ 9] Restrict Weapons v1.9.0.5263 AMXX Dev Team restmenu.amxx running
[ 10] Scrolling Message v1.9.0.5263 AMXX Dev Team scrollmsg.amxx running
[ 11] Admin Votes v1.9.0.5263 AMXX Dev Team adminvote.amxx running
[ 12] CS Misc. Stats v1.9.0.5263 AMXX Dev Team miscstats.amxx running
[ 13] CS Stats Logging v1.9.0.5263 AMXX Dev Team stats_logging.a running
[ 14] Stats Configuration v1.9.0.5263 AMXX Dev Team statscfg.amxx running
[ 15] [CSZONA.RU] Core v2.5 Sanlerus & Hellm jbe_core.amxx running
[ 16] Maps Menu v1.4.1 neugomon jbe_mapsmenu.am running
[ 17] Players Menu v1.8.2 AMXX Dev Team jbe_plmenu.amxx running
[ 18] Map Manager v2.5.54 Mistrick jbe_mapmanager. running
[ 19] [UJBL_CG] Question vvk/krisiso g3cKpunTop jbe_cg_question running
[ 20] [UJBL_CG] Truth or lie vvk/krisiso g3cKpunTop jbe_cg_truth_or running
[ 21] Lite Translit v2.9 neygomon && Hell jbe_translit.am running
[ 22] [JBE] Addons: Deathmen v1.2 OverGame jbe_ghost.amxx running
[ 23] HUD Customizer v0.3 Igoreso jbe_hud.amxx running
[ 24] Block MOTD v1.0 Sn!ff3r jbe_motd.amxx running
[ 25] [SJB] Grab v2.1 AlexandrFiner & jbe_grab.amxx running
[ 26] [S_JB] Block Guard on v1.2 OverGame && Hell jbe_guard_block running
[ 27] Paint v1.0 OverGame & stupo jbe_chief_marke running
[ 28] [S_JB] Managing Menu v1.0 Hellmith jbe_managing_me running
[ 29] [JBE_DM] Ringolevio v1.1 Freedo.m jbe_dm_ringolev running
[ 30] [JBE_DM] Blindfolders v1.1 ToJI9IHGaa jbe_dm_blindfol running
[ 31] [JailMode] GhostBuster v2.1 AlexandrFiner jbe_dm_ghostbus running
[ 32] [JailMode] Galaxy v1.0 AlexandrFiner jbe_dm_galaxy.a running
[ 33] [JailMode] He v1.1 AlexandrFiner jbe_dm_he.amxx running
[ 34] [JailMode] Hot Potato v1.1 AlexandrFiner jbe_dm_hot_pota running
[ 35] [JBE_DM] Hide And Seek v1.1 Freedo.m jbe_dm_hideands running
[ 36] [JBS] Predator v1.0 Emerald jbe_dm_predator running
[ 37] [JBE] Nemises v2.0 semisem+freddom jbe_dm_nemises. running
[ 38] Light v1.0 Author jbe_lights.amxx running
[ 39] [S_JB] Snow v1.0 Hellmith jbe_snow.amxx running
[ 40] Cristmas grenades v1.0 OverGame jbe_ny_grenade. running
[ 41] [S_JB] Objects v1.0 AlexandrFiner jbe_objects.amx running
[ 42] JBE SPLEAF + CREATE BL v1.0 cut by thezoloto jbe_block.amxx running
[ 43] Lite Translit v2.8 neygomon lite_translit.a running
[ 44] [JBE] Cases Menu vv1.0 CasesMenu.amxx running
[ 45] [JB ChiefGame] Mafia U vvk/krisiso g3cKpunTop ujbl_cg_mafia.a running
[ 46] Emotions v1.4 LeGioN jbe_emotion.amx running
[ 47] [JB] Boss Menu v[v2.6] Edit By NiKiTa JB_BossMenu.amx running
[ 48] [JBE] Ultimate Bank vvk.com/kri ToJI9IHGaa jbe_bank.amxx running
[ 49] Player Animations Menu v0.1.1 code PomanoB and jbe_dance_menu. running
[ 50] Teleport Menu v1.0.1 w0w teleport_menu.a running
[ 51] Walls Creator v1.1 d3m37r4 jbe_walls_creat running
[ 52] JB set day v1.0 By thezolotoi && jbe_day_set_a.a running
[ 53] Demo Recorder v2.4.1 F@nt0M jbe_demo_record running
[ 54] [ZP] Extra: Dual Deagl v1.0 LARS-DAY[BR]EAKE jbe_weapon_ddea running
[ 55] [AMXX] Weapon: Stinger v1.0.2 xUnicorn (t3rkec jbe_stinger.amx running
[ 56] ZP Extraitem: M950 Att v1.0 Base: Batcon & t jbe_m950se.amxx running
[ 57] [ZMO] Weapon: Skull-11 v0.1 Chrescoe1 jbe_skull11.amx running
[ 58] ZP Extraitem: FNP-45 v1.0 Base: Batcon; Re jbe_fnp45.amxx running
[ 59] [ZP] Extra: CSO Weapon v1.0 KORD_12.7 jbe_Crow9.amxx running
[ 60] [ZP] Weapon: AK47 Beas v1.0 | 2018 xUnicorn (t3rkec jbe_ak47_beast. running
[ 61] [ZP] Extra: CSO Weapon v1.1 KORD_12.7 jbe_awpz.amxx running
[ 62] [ZP] Addon: AWP Dragon v1.0 Crock / Lars ReE jbe_thunder.amx running
[ 63] LUCHY BLOCK v1.0 by thezolotoi jbe_luckyblock. running
63 plugins, 63 running
Автор плагина
Неизвестно
Версия плагина
Неизвестно
Исходный код
Show_QuestMenu(id)
{
new szMenu[512], iKeys = (1<<5|1<<7|1<<8|1<<9), iLen = formatex(szMenu, charsmax(szMenu), "%L^n^n", id, "JBE_MENU_QUESTS_TITLE");
if(!g_iUserQuest[id][ENABLED])
{
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \w%L \y'0/12'^n", id, "JBE_KEY", 1, id, "JBE_MENU_QUEST_1");
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \w%L \y'0/7'^n", id, "JBE_KEY", 2, id, "JBE_MENU_QUEST_2");
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \w%L \y'0/15'^n", id, "JBE_KEY", 3, id, "JBE_MENU_QUEST_3");
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \w%L \y'0/10'^n", id, "JBE_KEY", 4, id, "JBE_MENU_QUEST_4");
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \w%L \y'0/5'^n", id, "JBE_KEY", 5, id, "JBE_MENU_QUEST_5");
iKeys |= (1<<0|1<<1|1<<2|1<<3|1<<4);
}
else
{
if(g_iUserQuest[id][INDEX] == 0)
{
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \w%L \y'%d/12'^n", id, "JBE_KEY_BLOCKED", id, "JBE_MENU_QUEST_1", g_iUserQuest[id][PROGRESS]);
}
else iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \d%L \r'0/12'^n", id, "JBE_KEY_BLOCKED", id, "JBE_MENU_QUEST_1");
if(g_iUserQuest[id][INDEX] == 1)
{
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \w%L \y'%d/7'^n", id, "JBE_KEY_BLOCKED", id, "JBE_MENU_QUEST_2", g_iUserQuest[id][PROGRESS]);
}
else iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \d%L \r'0/7'^n", id, "JBE_KEY_BLOCKED", id, "JBE_MENU_QUEST_2");
if(g_iUserQuest[id][INDEX] == 2)
{
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \w%L \y'%d/15'^n", id, "JBE_KEY_BLOCKED", id, "JBE_MENU_QUEST_3", g_iUserQuest[id][PROGRESS]);
}
else iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \d%L \r'0/15'^n", id, "JBE_KEY_BLOCKED", id, "JBE_MENU_QUEST_3");
if(g_iUserQuest[id][INDEX] == 3)
{
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \w%L \y'%d/10'^n", id, "JBE_KEY_BLOCKED", id, "JBE_MENU_QUEST_4", g_iUserQuest[id][PROGRESS]);
}
else iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \d%L \r'0/10'^n", id, "JBE_KEY_BLOCKED", id, "JBE_MENU_QUEST_4");
if(g_iUserQuest[id][INDEX] == 4)
{
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \w%L \y'%d/5'^n", id, "JBE_KEY_BLOCKED", id, "JBE_MENU_QUEST_5", g_iUserQuest[id][PROGRESS]);
}
else iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \d%L \r'0/5'^n", id, "JBE_KEY_BLOCKED", id, "JBE_MENU_QUEST_5");
}
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n%L \w%L^n", id, "JBE_KEY", 6, id, "JBE_MENU_QUEST_PRIZE", id, g_szQuestPrizeLang[g_iQuestPrize]);
if(g_iUserQuest[id][ENABLED])
{
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \w%L^n", id, "JBE_KEY", 7, id, "JBE_MENU_QUESTS_CANCEL");
iKeys |= (1<<6);
}
else iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \d%L^n", id, "JBE_KEY_BLOCKED", id, "JBE_MENU_QUESTS_CANCEL");
if(g_iUserQuest[id][ENABLED])
{
switch(g_iUserQuest[id][INDEX])
{
case 0:
{
if(g_iUserQuest[id][PROGRESS] >= 12)
{
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \w%L^n", id, "JBE_KEY", 8, id, "JBE_MENU_QUESTS_TAKE_PRIZE");
iKeys |= (1<<7);
}
else iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \d%L^n", id, "JBE_KEY_BLOCKED", id, "JBE_MENU_QUESTS_TAKE_PRIZE");
}
case 1:
{
if(g_iUserQuest[id][PROGRESS] >= 7)
{
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \w%L^n", id, "JBE_KEY", 8, id, "JBE_MENU_QUESTS_TAKE_PRIZE");
iKeys |= (1<<7);
}
else iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \d%L^n", id, "JBE_KEY_BLOCKED", id, "JBE_MENU_QUESTS_TAKE_PRIZE");
}
case 2:
{
if(g_iUserQuest[id][PROGRESS] >= 15)
{
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \w%L^n", id, "JBE_KEY", 8, id, "JBE_MENU_QUESTS_TAKE_PRIZE");
iKeys |= (1<<7);
}
else iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \d%L^n", id, "JBE_KEY_BLOCKED", id, "JBE_MENU_QUESTS_TAKE_PRIZE");
}
case 3:
{
if(g_iUserQuest[id][PROGRESS] >= 10)
{
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \w%L^n", id, "JBE_KEY", 8, id, "JBE_MENU_QUESTS_TAKE_PRIZE");
iKeys |= (1<<7);
}
else iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \d%L^n", id, "JBE_KEY_BLOCKED", id, "JBE_MENU_QUESTS_TAKE_PRIZE");
}
case 4:
{
if(g_iUserQuest[id][PROGRESS] >= 5)
{
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \w%L^n", id, "JBE_KEY", 8, id, "JBE_MENU_QUESTS_TAKE_PRIZE");
iKeys |= (1<<7);
}
else iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \d%L^n", id, "JBE_KEY_BLOCKED", id, "JBE_MENU_QUESTS_TAKE_PRIZE");
}
}
}
else iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L \d%L^n", id, "JBE_KEY_BLOCKED", id, "JBE_MENU_QUESTS_TAKE_PRIZE");
iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n%L \w%L", id, "JBE_KEY", 9, id, "JBE_MENU_BACK");
formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n%L \w%L", id, "JBE_KEY", 0, id, "JBE_MENU_EXIT");
return show_menu(id, iKeys, szMenu, -1, "Show_QuestMenu");
}

public Handle_QuestMenu(id, iKey)
{
switch(iKey)
{
case 0:
{
g_iUserQuest[id][ENABLED] = true;
g_iUserQuest[id][PROGRESS] = 0;
g_iUserQuest[id][INDEX] = iKey;
}
case 1:
{
g_iUserQuest[id][ENABLED] = true;
g_iUserQuest[id][PROGRESS] = 0;
g_iUserQuest[id][INDEX] = iKey;
}
case 2:
{
g_iUserQuest[id][ENABLED] = true;
g_iUserQuest[id][PROGRESS] = 0;
g_iUserQuest[id][INDEX] = iKey;
}
case 3:
{
g_iUserQuest[id][ENABLED] = true;
g_iUserQuest[id][PROGRESS] = 0;
g_iUserQuest[id][INDEX] = iKey;
}
case 4:
{
g_iUserQuest[id][ENABLED] = true;
g_iUserQuest[id][PROGRESS] = 0;
g_iUserQuest[id][INDEX] = iKey;
}
case 5:
{
if(g_iQuestPrize == charsmax(g_szQuestPrizeLang)) g_iQuestPrize = 0;
else g_iQuestPrize++;
}
case 6:
{
if(g_iUserQuest[id][ENABLED])
{
g_iUserQuest[id][ENABLED] = false;
g_iUserQuest[id][INDEX] = -1;
g_iUserQuest[id][PROGRESS] = 0;
}
UTIL_SayText(id, "%L %L", id, "JBE_CHAT_PREFIX", id, "JBE_MENU_QUEST_CANCELED");
}
case 7:
{
if(g_iUserQuest[id][ENABLED])
{
switch(g_iUserQuest[id][INDEX])
{
case 0:
{
new szName[32]; get_user_name(id, szName, charsmax(szName));

g_iUserQuest[id][ENABLED] = false;
g_iUserQuest[id][PROGRESS] = 0;
g_iUserQuest[id][INDEX] = -1;
switch(g_iQuestPrize)
{
case 0:
{
new Random = random_num(50, 300);
jbe_set_user_money(id, g_iUserMoney[id] + Random, 1);
}
case 1:
{
new Random = random_num(5, 15);
jbe_set_user_exp(id, jbe_get_user_exp(id) + Random, 1);
}
}
}
case 1:
{
new szName[32]; get_user_name(id, szName, charsmax(szName));

g_iUserQuest[id][ENABLED] = false;
g_iUserQuest[id][PROGRESS] = 0;
g_iUserQuest[id][INDEX] = -1;
switch(g_iQuestPrize)
{
case 0:
{
new Random = random_num(50, 300);
jbe_set_user_money(id, g_iUserMoney[id] + Random, 1);
}
case 1:
{
new Random = random_num(5, 15);
jbe_set_user_exp(id, jbe_get_user_exp(id) + Random, 1);
}
}
}
case 2:
{
new szName[32]; get_user_name(id, szName, charsmax(szName));

g_iUserQuest[id][ENABLED] = false;
g_iUserQuest[id][PROGRESS] = 0;
g_iUserQuest[id][INDEX] = -1;
switch(g_iQuestPrize)
{
case 0:
{
new Random = random_num(50, 300);
jbe_set_user_money(id, g_iUserMoney[id] + Random, 1);
}
case 1:
{
new Random = random_num(5, 15);
jbe_set_user_exp(id, jbe_get_user_exp(id) + Random, 1);
}
}
}
case 3:
{
new szName[32]; get_user_name(id, szName, charsmax(szName));

g_iUserQuest[id][ENABLED] = false;
g_iUserQuest[id][PROGRESS] = 0;
g_iUserQuest[id][INDEX] = -1;
switch(g_iQuestPrize)
{
case 0:
{
new Random = random_num(50, 300);
jbe_set_user_money(id, g_iUserMoney[id] + Random, 1);
}
case 1:
{
new Random = random_num(5, 15);
jbe_set_user_exp(id, jbe_get_user_exp(id) + Random, 1);
}
}
}
case 4:
{
new szName[32]; get_user_name(id, szName, charsmax(szName));

g_iUserQuest[id][ENABLED] = false;
g_iUserQuest[id][PROGRESS] = 0;
g_iUserQuest[id][INDEX] = -1;
switch(g_iQuestPrize)
{
case 0:
{
new Random = random_num(50, 300);
jbe_set_user_money(id, g_iUserMoney[id] + Random, 1);
}
case 1:
{
new Random = random_num(5, 15);
jbe_set_user_exp(id, jbe_get_user_exp(id) + Random, 1);
}
}
}
}
}
}
case 8: return Show_OtherMenu(id);
case 9: return PLUGIN_HANDLED;
}
return Show_QuestMenu(id);
}
Меню вшито в мод. В логах ошибок нету. Баг:
Открываю меню заданий, активные пункты в меню только первые 5 пунктов заданий и 6 пункт выбора награды за задание. При этом 7 и 8 пункт не доступны (серые),
7 пункт нажать нельзя, но 8 пункт нажимается. После выбираю любой задание, становится активен 7 пункт, он позволяет отменить задание, при этом 8 пункт всё ещё не доступен (Получить награду), но нажать его можно. При выборе 8 пункта выполняется задание, хотя его даже и не выполняли. Таким образом можно бесконечно выполнять любое задание и получать награду, при этом задание мы не выполняли.
Как я понял, нужно сделать 8 пункту условие на проверку задания, может оно уже сделано, не разбираюсь... Помогите пожалуйста исправить баг.
 
В этой теме было размещено решение! Перейти к решению.
Сообщения
1,293
Реакции
2,294
Помог
57 раз(а)
den980021,
В битсумму кнопок сразу сложены (будут нажиматься) кнопки
Код:
new szMenu[512], iKeys = (1<<5|1<<7|1<<8|1<<9)
Код:
#define MENU_KEY_1      (1<<0)
#define MENU_KEY_2      (1<<1)
#define MENU_KEY_3      (1<<2)
#define MENU_KEY_4      (1<<3)
#define MENU_KEY_5      (1<<4)
#define MENU_KEY_6      (1<<5)
#define MENU_KEY_7      (1<<6)
#define MENU_KEY_8      (1<<7)
#define MENU_KEY_9      (1<<8)
#define MENU_KEY_0      (1<<9)
Как видим, у вас в любом случае нажимаются 6, 8, 9, 0
Вероятнее всего нужно сделать
Код:
new szMenu[512], iKeys = (1<<5|1<<8|1<<9)
 

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

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