Skip to content

Commit

Permalink
1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
WessTorn committed Jun 29, 2024
1 parent c599a29 commit aa57872
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions scripting/demo_recorder.sma
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ new const LOG_FILE_NAME[16] = "DemoRecorder"
new g_szChooseFile[64];

public plugin_init() {
register_plugin("Demo recorder", "1.2", "WessTorn");
register_plugin("Demo recorder", "1.3", "WessTorn");

register_clcmd("demo_menu", "cmdDemoMenu", ADMIN_BAN);

Expand Down Expand Up @@ -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;
}

Expand All @@ -118,8 +118,6 @@ public DemoMenuCode(id, hMenu, item) {

showDemoMenu(id, iPlayer);

menu_destroy(hMenu);

return PLUGIN_HANDLED;
}

Expand Down Expand Up @@ -165,16 +163,15 @@ 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;
}

new szData[6], szName[64], iAccess, iCallback;
menu_item_getinfo(hMenu, item, iAccess, szData, charsmax(szData), szName, charsmax(szName), iCallback);
menu_destroy(hMenu);
new iKey = str_to_num(szData);

switch (iKey) {
Expand Down Expand Up @@ -209,14 +206,13 @@ public verifMenu(id) {
}

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

switch (item) {
case 0: {
menu_destroy(hMenu);
cmdDemoMenu(id);
g_iPlayer[id] = 0;
return PLUGIN_HANDLED;
Expand Down

0 comments on commit aa57872

Please sign in to comment.