mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 14:25:38 +03:00
Newmenus: get_user_menu should also handle newmenu timeouts properly
This commit is contained in:
parent
fa5336cade
commit
c8b7a09028
@ -2962,7 +2962,14 @@ static cell AMX_NATIVE_CALL get_user_menu(AMX *amx, cell *params) /* 3 param */
|
||||
{
|
||||
if (gpGlobals->time > pPlayer->menuexpire)
|
||||
{
|
||||
pPlayer->menu = 0;
|
||||
int menu = pPlayer->newmenu;
|
||||
if (menu >= 0 && menu < (int)g_NewMenus.size() && g_NewMenus[menu])
|
||||
{
|
||||
Menu *pMenu = g_NewMenus[menu];
|
||||
pMenu->Close(pPlayer->index);
|
||||
}
|
||||
else
|
||||
pPlayer->menu = 0;
|
||||
|
||||
*cpMenu = 0;
|
||||
*cpKeys = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user