Hello.
This is a simple menu code that i found, it only shows a menu when players say /menu,
I have 0 knowledge about coding or scripting.
I want the menu to
give only one item per round, and it should be accessible only in
the buy time, or for 15 seconds from the beginning of the round
Code:
// Generated with v3x's AMXX Menu Generator
#include <amxmodx>
public plugin_init()
{
register_plugin("My Menu", "1.0", "Me");
register_clcmd("say /menu", "ShowMenu", _, "");
}
public ShowMenu(id)
{
new menu = menu_create("SUPER GAMING MENU", "MENU");
menu_additem(menu, "Armor ", "", 0); // case 0
menu_additem(menu, "Hegrenade 1", "", 0); // case 1
menu_additem(menu, "Flash 1", "", 0); // case 2
menu_additem(menu, "Extra Money +800$", "", 0); // case 3
menu_additem(menu, "Extra Ammo Primary + Secondary", "", 0); // case 4
menu_additem(menu, "", "", 0); // case 5
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_setprop(menu, MPROP_PERPAGE, 5);
menu_setprop(menu, MPROP_NOCOLORS, 1);
menu_display(id, menu, 0);
return PLUGIN_HANDLED;
}
public MENU(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_cancel(id);
return PLUGIN_HANDLED;
}
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: client_print(id, print_chat, "You have selected Armor ");
case 1: client_print(id, print_chat, "You have selected Hegrenade 1");
case 2: client_print(id, print_chat, "You have selected Flash 1");
case 3: client_print(id, print_chat, "You have selected Extra Money +800$");
case 4: client_print(id, print_chat, "You have selected Extra Ammo Primary + Secondary");
case 5: client_print(id, print_chat, "You have selected ");
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
Thanks in advance