Creating a global variable that holds the index of the selected player is also a valid option.
Code:
new g_playerid[ 33 ];
// in menu_handler
// instead of new tempid = str_to_num(data):
g_playerid[ id ] = str_to_num( data );
// then use g_playerid[ id ] to retrieve the selected player index
// get_user_name(g_playerid[ id ], name, charsmax( name ) );
// etc...
// and then in submenu_handler
// use the global variable to retrieve the index
new key = str_to_num( data );
set_user_ammo( g_playerid[ id ], g_ammoAmount[ key ] );
// just an example, set_user_ammo does not exist as an amxx native
__________________