From fdbcb8b9df14fdb515b58a9521535eb860f40176 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 3 Aug 2004 23:55:43 +0000 Subject: [PATCH] Fixed show_menu --- amxmodx/amxmodx.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/amxmodx/amxmodx.cpp b/amxmodx/amxmodx.cpp index c945b4f8..517065b7 100755 --- a/amxmodx/amxmodx.cpp +++ b/amxmodx/amxmodx.cpp @@ -693,7 +693,12 @@ static cell AMX_NATIVE_CALL show_menu(AMX *amx, cell *params) /* 3 param */ { int ilen; char* sMenu = get_amxstring(amx,params[3],0,ilen); - int menuid = g_menucmds.findMenuId( sMenu, amx ); + int numparam = *params/sizeof(cell); + int menuid = 0; + if (numparam == 4) + menuid = g_menucmds.findMenuId(get_amxstring(amx, params[4], 1, ilen), amx); + else + menuid = g_menucmds.findMenuId(sMenu, amx); int keys = params[2]; int time = params[4]; if (params[1] == 0) {