hello everyone ,
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam( Ham_Spawn, "player", "Player_Spawn", 1 );
}
public Player_Spawn(id)
{
menu(id)
}
public menu(id)
{
new menu1 = menu_create("menu", "sub_menu")
menu_additem(menu1, "options 1", "1", 0);
menu_additem(menu1, "options 2", "2", 0);
menu_additem(menu1, "options 3", "3", 0);
menu_setprop(menu1, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu1, 0);
}
public sub_menu(id, menu1, item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu1);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu1, item, access, data, 6, iName, 63, callback)
new key = str_to_num(data);
switch( key )
{
case 1:
{
client_print(id, print_chat, "options 1")
}
case 2:
{
client_print(id, print_chat, "options 2")
}
case 3:
{
client_print(id, print_chat, "options 3")
}
}
menu_destroy(menu1);
return PLUGIN_HANDLED;
}
I want to do when the round ends The menu will disappear
thx.