Raised This Month: $ Target: $400
 0% 

Help!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 01-30-2005 , 13:28  
Reply With Quote #2

AMX Mod / AMX Mod X Menu tutorial by Xeroblood. This is a really useful tutorial , but if you want the actual code , here it is. :
Code:
#include <amxmodx> 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     format( szMenuBody, 255, "\yFirst Menu:^n" )     add( szMenuBody, 255, "^n\w1. First Option" )     add( szMenuBody, 255, "^n\w2. Second Option" )     add( szMenuBody, 255, "^n\w3. Third Option" )     add( szMenuBody, 255, "^n\w4. Fourth Option" )     add( szMenuBody, 255, "^n\w5. Fifth Option" )     add( szMenuBody, 255, "^n\w6. Sixth Option" )     add( szMenuBody, 255, "^n\w7. Seventh Option" )     add( szMenuBody, 255, "^n\w8. Eighth Option" )     add( szMenuBody, 255, "^n\w9. Ninth Option" )     add( szMenuBody, 255, "^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 ) {     client_print( id, print_console, "[AMX] Key=%d", key )     client_print( id, print_chat, "[AMX] Key=%d", 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 }
Peli is offline
Send a message via MSN to Peli
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:23.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode