Raised This Month: $ Target: $400
 0% 

Weapon Menu Plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 04-02-2004 , 14:39   Weapon Menu Plugin
Reply With Quote #1

Hello I am working on a Weapon Menu Plugin for practice. Maybe I will release it if there isn't one already. I need you guys to look over it for errors and tell me what I did wrong and explain it please , Okay here is the plugin :

Code:
#include <amxmodx> public plugin_init() {     register_plugin( "Weapon Menu", "1.0", "Peli" )     register_clcmd( "say /menu","ShowMenu", -1, "Shows a weapon menu" )     register_menucmd(register_menuid("\yWeapon Menu:"), 1023, "MenuCommand" )         return PLUGIN_CONTINUE } public ShowMenu( id ) {     new szMenuBody[256]     new keys     format( szMenuBody, 255, "\yWeapon Menu:^n" )     add( szMenuBody, 255, "^n\w1. AK47" )     add( szMenuBody, 255, "^n\w2. AK47" )     add( szMenuBody, 255, "^n\w3. AK47" )     add( szMenuBody, 255, "^n\w4. AK47" )     add( szMenuBody, 255, "^n\w5. AK47" )     add( szMenuBody, 255, "^n\w6. AK47" )     add( szMenuBody, 255, "^n\w7. AK47" )     add( szMenuBody, 255, "^n\w8. AK47" )     add( szMenuBody, 255, "^n\w9. AK47" )     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, "I gave you an ak47" )         case 1: client_print( id, print_chat, "I gave you an ak47" )         case 2: client_print( id, print_chat, "I gave you an ak47" )         case 3: client_print( id, print_chat, "I gave you an ak47" )         case 4: client_print( id, print_chat, "I gave you an ak47" )         case 5: client_print( id, print_chat, "I gave you an ak47" )         case 6: client_print( id, print_chat, "I gave you an ak47" )         case 7: client_print( id, print_chat, "I gave you an ak47" )         case 8: client_print( id, print_chat, "I gave you an ak47" )                 case 9: client_print( id, print_chat, "I gave you an ak47" )                 case 9: client_print( id, print_chat, 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 22:31.


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