Hello guys,
I want add to my menu function, that players can take only one item per round from menu and if player want take again in same round, game will say something like "You have taken item already, wait to next round..."
And second thing that i need is, after Game Commencing - 1st round will menu deactived and automatically will say to all players something like "In 1st round you cant use menu". After 1st round at start of 2nd round and every round menu will actived and shows to all. Can someone help, please?
Thanks!!
PHP Code:
#include <amxmodx>
public plugin_init()
{
register_plugin("Awesome menu", "1.0", "me");
register_clcmd("say /menu", "AwesomeMenu", _, "");
}
public AwesomeMenu(id)
{
new menu = menu_create("Look at this awesome Menu!:", "my_awesome_menu");
menu_additem(menu, "I'm Selection #1", "", 0);
menu_additem(menu, "I'm Selection #2", "", 0);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);
}
public my_awesome_menu(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(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, "Hooray! You selected the Awesome 1st Selection");
case 1: client_print(id, print_chat, "OH NO! You selected the Awesome 2nd Selection! BEWARE!");
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}