Raised This Month: $ Target: $400
 0% 

Simple menu..


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
tbonus
Junior Member
Join Date: Apr 2006
Old 05-07-2006 , 08:40   Simple menu..
Reply With Quote #1

I am trying to make this menu so I can access common cmds and command menus. #1, 4, 5,6, and 7 don't work.

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #define PLUGIN "tb Menu" #define VERSION "0.1" #define AUTHOR "tbonus" new g_Menu public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)           register_clcmd("say /tbmenu", "Menu_Command", ADMIN_CFG)     register_clcmd("amx_tbsmenu", "Menu_Command", ADMIN_CFG)           g_Menu = menu_create("tb's Menu", "Menu_Handle")     menu_additem(g_Menu, "Go to tb's amxmodmenu", "1")     menu_additem(g_Menu, "Hook on", "2")     menu_additem(g_Menu, "Hook off", "3")     menu_additem(g_Menu, "CAL menu", "4")     menu_additem(g_Menu, "csdm_menu", "5")     menu_additem(g_Menu, "Unlimited Nades", "6")     menu_additem(g_Menu, "Unlimited Nades off", "7") } public Menu_Command(id, level, cid) {     if (!cmd_access(id, level, cid, 1))         return PLUGIN_HANDLED               menu_display(id, g_Menu, 0)           return PLUGIN_HANDLED } public Menu_Handle(id, Menu, Item) {     new szCommand[3],  Accesss, Callback           menu_item_getinfo(Menu, Item, Accesss, szCommand, 2, _, _, Callback)           switch(szCommand[0])     {         case '-':         {             return PLUGIN_HANDLED         }                   case '1':         {             server_cmd("amx_tbmenu")                     }                   case '2':         {             server_cmd("df_hook_on 1")         }                   case '3':         {             server_cmd("df_hook_on 0")         }                   case '4':         {             server_cmd("amx_calmenu")         }                   case '5':         {             server_cmd("csdm_menu")         }                   case '6':         {             server_cmd("amx_nade *all")         }                   case '7':         {             server_cmd("amx_unnade *all")         }     }           return PLUGIN_HANDLED }
tbonus is offline
 



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 05:08.


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