So if it's separated by the teams (Ts see one options and CTs others) so it's dynamical?
One more common question.
Is it correct way to display same menu again after players choise (want to make multiple choises from menu)
PHP Code:
public SomeMenu(id)
{
new menu = menu_create("\yNAME OF MENU", "menu_handler")
menu_additem(menu, "\wOption 1", "1", 0)
menu_additem(menu, "\wOption 2", "2", 0)
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu, 0)
}
public menu_handler(id, menu, item)
{
if(item == MENU_EXIT || !is_user_alive(id))
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new Data[7], Name[64]
new Access, Callback
menu_item_getinfo(menu, item, Access, Data,5, Name, 63, Callback)
new Key = str_to_num(Data)
switch (Key)
{
case 1:
{
client_print(id, print_chat, "Hello !")
menu_display(id, menu, 0)
}
case 2:
{
client_print(id, print_chat, "Hello !!")
menu_display(id, menu, 0)
}
return PLUGIN_HANDLED
}