Hi. I need use menu_display() to show the last page what an user have saw, cause when he did his choice the menu will open in the same page.
I used this but it don't work.
Code:
/* Menu Page */
new mPage[33];
public cmdMenu(id)
{
new menu = menu_create("Menu :", "MenuHandler");
/* Items goes here */
menu_display(id, menu, mPage[id]);
return PLUGIN_HANDLED;
}
public MenuHandler(id, menu, item)
{
if(item == MENU_EXIT)
{
mPage[id] = 0;
menu_destroy(menu);
return PLUGIN_HANDLED;
}
if(item == MENU_MORE)
mPage[id]++;
if(item == MENU_BACK && mPage[id] > 0)
mPage[id]--;
new iData[6], iName[64], Access, Callback;
menu_item_getinfo(menu, item, Access, iData, charsmax(iData), iName, charsmax(iName), Callback);
new Target = str_to_num(iData);
/* Choices goes here */
menu_display(id, menu, mPage[id]);
return PLUGIN_HANDLED;
}
Thanks.