Sorry for late reply, I created this
EXAMPLE code but I haven't tested it. (Should be working in my opinion)
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "--"
#define VERSION "1.0"
#define AUTHOR "thEsp"
new SpecificItem[32] = "3"
new bool:MenuHas_Item=false
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /test","Test")
register_clcmd("say /test_check","TestCheck")
}
public Test(id)
{
new menu = menu_create("\rMenu for test","menu_handler_event")
new i
new str[32]
new i_ItemNumber=0
new str_ItemNumber[32]
for(i=0; i<6; i++)
{
if(i==SpecificItem[id])
{
MenuHas_Item=true
}
num_to_str(i,str,10)
num_to_str(i_ItemNumber,str_ItemNumber,10)
menu_additem(menu,str,str_ItemNumber)
i_ItemNumber++
}
menu_setprop(menu,MPROP_EXIT,MEXIT_ALL)
menu_display(id,menu,0)
}
public menu_handler_event(id,item,menu)
{
switch(item)
{
case MENU_EXIT:
{
menu_destroy(menu)
}
}
}
public TestCheck(id)
{
if(MenuHas_Item==true)
{
client_print(id,print_chat,"Item [ %s ] exists",SpecificItem)
}
}
EDIT: I checked this, and works alright. The reason I added just 6 items in menu is because menus can display 7 items (Including exit I think) and make simplier code.