Skip to content

Commit

Permalink
1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
WessTorn committed Jun 29, 2024
1 parent aa57872 commit 1d8346c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions scripting/demo_recorder.sma
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,17 @@ public cmdDemoMenu(id) {
}

public DemoMenuCode(id, hMenu, item) {
menu_destroy(hMenu);
if (item == MENU_EXIT) {
menu_destroy(hMenu);
return PLUGIN_HANDLED;
}

new szData[6], szName[64], iAccess, iCallback;
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;
Expand Down Expand Up @@ -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;
Expand All @@ -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])) {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 1d8346c

Please sign in to comment.