From 1d8346cbea1e9f64d19e93b620d715ce1930f92f Mon Sep 17 00:00:00 2001 From: WessTorn Date: Sat, 29 Jun 2024 19:35:52 +0300 Subject: [PATCH] 1.3.1 --- scripting/demo_recorder.sma | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripting/demo_recorder.sma b/scripting/demo_recorder.sma index 6bd9bf6..ef43615 100644 --- a/scripting/demo_recorder.sma +++ b/scripting/demo_recorder.sma @@ -102,8 +102,8 @@ public cmdDemoMenu(id) { } public DemoMenuCode(id, hMenu, item) { - menu_destroy(hMenu); if (item == MENU_EXIT) { + menu_destroy(hMenu); return PLUGIN_HANDLED; } @@ -111,6 +111,8 @@ public DemoMenuCode(id, hMenu, item) { menu_item_getinfo(hMenu, item, iAccess, szData, charsmax(szData), szName, charsmax(szName), iCallback); new iPlayer = str_to_num(szData); + menu_destroy(hMenu); + if (!is_user_connected(iPlayer)) { cmdDemoMenu(id); return PLUGIN_HANDLED; @@ -163,8 +165,8 @@ public showDemoMenu(id, iPlayer) { } public showDemoMenuCode(id, hMenu, item) { - menu_destroy(hMenu); if (item == MENU_EXIT) { + menu_destroy(hMenu); g_iPlayer[id] = 0; cmdDemoMenu(id); return PLUGIN_HANDLED; @@ -174,6 +176,8 @@ public showDemoMenuCode(id, hMenu, item) { menu_item_getinfo(hMenu, item, iAccess, szData, charsmax(szData), szName, charsmax(szName), iCallback); new iKey = str_to_num(szData); + menu_destroy(hMenu); + switch (iKey) { case 1: { if (is_user_connected(g_iPlayer[id])) { @@ -206,11 +210,13 @@ public verifMenu(id) { } public verifMenuCode(id, hMenu, item) { - menu_destroy(hMenu); if (item == MENU_EXIT) { + menu_destroy(hMenu); return PLUGIN_HANDLED; } + menu_destroy(hMenu); + switch (item) { case 0: { cmdDemoMenu(id);