You can pass the parameters into the info.
Code:
#include <amxmodx>
public menu ( param[1] )
{
new iMenu = menu_create ( "Test", "handler" )
menu_additem ( iMenu, "Test", "1 ^"data 1^" ^"data 2^"" )
menu_display ( id, iMenu )
return PLUGIN_HANDLED
}
/* - - - - - - - */
public handler ( id, iMenu, iItem )
{
if ( iItem == MENU_EXIT )
{
menu_destroy ( iMenu )
return PLUGIN_HANDLED
}
new iAccess, iCallback, sData[33], sName[65]
menu_item_getinfo( iMenu, iItem, iAccess, sData, 32, sName, 64, iCallback )
new sKey[4], sData1[16], sData2[16];
parse(sData, sKey, 3, sData1, 15, sData2, 15);
new iKey = str_to_num(sKey);
// need two indexes :(
new index1 = str_to_num(sData1);
new index2 = str_to_num(sData2);
return PLUGIN_HANDLED
}