|
Senior Member
|

05-11-2005
, 13:20
Menu Page 2 Help~
|
#1
|
how to add page 2 in my menu ?
help...
Quote:
#include <amxmod>
public plugin_init()
{
register_clcmd( "say /menu","ShowMenu", -1, "Shows The menu" )
register_menucmd(register_menuid("\yFirst Menu:"), 1023, "MenuCommand" )
return PLUGIN_CONTINUE
}
public ShowMenu( id )
{
new szMenuBody[256]
new keys
new nLen = format( szMenuBody, 255, "\yFirst Menu:^n" )
nLen += format( szMenuBody[nLen], 255-nLen, "^n\w1. First Option" )
nLen += format( szMenuBody[nLen], 255-nLen, "^n\w2. Second Option" )
nLen += format( szMenuBody[nLen], 255-nLen, "^n\w3. Third Option" )
nLen += format( szMenuBody[nLen], 255-nLen, "^n\w4. Fourth Option" )
nLen += format( szMenuBody[nLen], 255-nLen, "^n\w5. Fifth Option" )
nLen += format( szMenuBody[nLen], 255-nLen, "^n\w6. Sixth Option" )
nLen += format( szMenuBody[nLen], 255-nLen, "^n\w7. Seventh Option" )
nLen += format( szMenuBody[nLen], 255-nLen, "^n\w8. Eighth Option" )
nLen += format( szMenuBody[nLen], 255-nLen, "^n\w9. Ninth Option" )
nLen += format( szMenuBody[nLen], 255-nLen, "^n^n\w0. Exit" )
keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<8 |1<<9)
show_menu( id, keys, szMenuBody, -1 )
return PLUGIN_CONTINUE
}
public MenuCommand( id, key )
{
switch( key )
{
case 0: client_print( id, print_chat, "Menu Option #1" )
case 1: client_print( id, print_chat, "Menu Option #2" )
case 2: client_print( id, print_chat, "Menu Option #3" )
case 3: client_print( id, print_chat, "Menu Option #4" )
case 4: client_print( id, print_chat, "Menu Option #5" )
case 5: client_print( id, print_chat, "Menu Option #6" )
case 6: client_print( id, print_chat, "Menu Option #7" )
case 7: client_print( id, print_chat, "Menu Option #8" )
case 8: client_print( id, print_chat, "Menu Option #9" )
case 9: client_print( id, print_chat, "Menu Option EXIT" )
}
return PLUGIN_HANDLED
}
|
|
|