|
发表于 2009-8-21 11:49:47
|
显示全部楼层
|阅读模式
来自 中国–广东–广州–从化区
请教一下各位大哥,使用新菜单系统理弹出菜单我选择其中1~7后 如何还可以保持菜单而不被取消 ,现在就算我不执行menu_destroy(menu)我取消销毁菜单指令也不管用
public clcmd_menu(id)
{
new menu = menu_create("\w新菜单", "menu_main");
menu_additem(menu,"菜单1","1",0);
menu_additem(menu,"菜单2","2",0 );
menu_additem(menu,"菜单3","3",0 );
new temp_menu[64]
// Back - Next - Exit
formatex(temp_menu, charsmax(temp_menu), "%s", "返回")
menu_setprop(menu, MPROP_BACKNAME, temp_menu)
formatex(temp_menu, charsmax(temp_menu), "%s","下页")
menu_setprop(menu, MPROP_NEXTNAME, temp_menu)
formatex(temp_menu, charsmax(temp_menu), "%s","退出")
menu_setprop(menu, MPROP_EXITNAME, temp_menu)
menu_display(id, menu, 0);
}
public menu_main(id, menu, item){
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
new key = str_to_num(data);
switch (key)
{
case 1:
{
}
}
//menu_destroy(menu); //我取消销毁菜单指令也不管用
//return PLUGIN_HANDLED;
} |
|