Quote:
Originally Posted by Nextra
You forgot to post the code to your "Answers_SubMenu" handler, but here's a rough outline of what would solve your problem:
|
it is useless, not here is the problem...
Quote:
Originally Posted by Nextra
PHP Code:
public RaceMenu_Handler(id, menu, item) {
// ...
new menu = menu_create(Text, "Answers_SubMenu");
challenge_menu[id] = menu; // save the menu id
// ...
}
public Answers_SubMenu(id, menu, item) {
// ...
challenge_menu[id] = -1; // reset the menu id to an invalid id
// ...
}
public Refuse(id) {
if (challenge_menu[id] != -1)
menu_destroy(challenge_menu[id]); // only destroy if the menu still exists
}
Depending on how your current "Answers_SubMenu" looks your code would break even if the player presses exit manually. The code above is how you should usually solve this.
|
Answers_SubMenu won't be called, because another menu will display and will close my menu..
All the things will happen in this way :
1. menu created and desplayed from RaceMenu_Handler - my plugin
2. menu will be closed/distroyed and Answers_SubMenu won't be called - another plugin (which i deleted the source

)
3. refuse will be called and a error will be appear - my plugin
so.. if is not an issue, and a new native menu_exists can't be created... how cand i know if my menu is destroyed or not ? tell me...