Quote:
Originally Posted by zXCaptainXz
Use the old menu system and save yourself a lot of headaches.
|
Read again, also the old menu system is the same of the new but the difference thing is the new has created with stock that let the menu be easier to use, Also I remember i saw it on a plugin but couldn't find it
Edit: is it possible or not with new menu style?
Tried but i can not press the category:
PHP Code:
public CreateSubMenu( id )
{
new szPlayers[ MAX_PLAYERS ], iNum, szID[ 5 ], iMenu = menu_create( "Test", "SubMenuHandler" );
get_players( szPlayers, iNum, "ch" );
for( new i ; i < iNum; i++)
{
num_to_str( i, szID, charsmax( szID ) );
menu_additem( iMenu, fmt( "%n", id ), szID );
}
menu_setprop( iMenu, MPROP_BACKNAME, "\wReplace item" )
if( !menu_pages( iMenu ) )
{
client_print( id, print_chat, "There's no players found...")
}
else menu_display( id, iMenu, .page = 0 );
return PLUGIN_HANDLED;
}
public SubMenuHandler( id, iMenu, iItem )
{
switch( iItem )
{
case MENU_EXIT: menu_destroy( iMenu );
case MENU_BACK: client_print_color( id, print_team_default, "^4[Items]^1 Test category number 8^1.")
}
return PLUGIN_HANDLED;
}
__________________