Ok... what?
Quote:
PHP Code:
new data[6], iName[64], access, callback; new key = str_to_num(data); switch(key) { case 1: { ShowWeaponMenu(id); return PLUGIN_HANDLED; } }
|
Key will
always be 0... menu_item_getinfo needs to be above the str_to_num for this to work.
Alternatively, you could just use
item. The first menu item is 0, the second is 1, etc. So:
PHP Code:
if (item == 0)
{
ShowWeaponMenu(id)
return PLUGIN_HANDLED
}