Raised This Month: $51 Target: $400
 12% 

menu doesnt destroy


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Adomaz1
Senior Member
Join Date: Feb 2014
Old 09-23-2016 , 06:49   menu doesnt destroy
Reply With Quote #1

Why doesn't the menu destroy after 10 seconds?

Code:
#include <amxmodx>
#include <amxmisc>

public plugin_init() {

    register_plugin("Button Menu","1.0","Adomaz");
	register_clcmd("chooseteam", "clcmd_chooseteam");
	
	set_task(10.0, "DestroyMenu");
	
	register_dictionary("buttonmenu.txt");
}

public DestroyMenu(id)
{
    show_menu(id, 0, "^n", 1);
} 

public clcmd_chooseteam(id)
{
		show_menu_main(id)
		return PLUGIN_HANDLED;
}

show_menu_main(id)
{
	new data[64];
	formatex(data, charsmax(data), "%L", id, "b4");
	new menu = menu_create(data , "mh_MyMenu");

	formatex(data, charsmax(data), "%L", id, "b2");
	menu_additem(menu , data , "0" , 0);
	
    menu_display(id , menu , 0);

	return PLUGIN_CONTINUE
}

public mh_MyMenu(id, menu, item)
{
	new command[6], name[64], access, callback;

	menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);

	switch(item)
	{
		//case 0: 
	}

	menu_destroy(menu);

	return PLUGIN_HANDLED;
}
Adomaz1 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode