Raised This Month: $ Target: $400
 0% 

Simple menu..


Post New Thread Reply   
 
Thread Tools Display Modes
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
FatalisDK
Senior Member
Join Date: Mar 2006
Location: bacon
Old 05-07-2006 , 08:44  
Reply With Quote #2

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':         {             client_cmd(id, "amx_tbmenu")         }                   case '2':         {              set_cvar_num("df_hook_on", 1)         }                   case '3':         {             set_cvar_num("df_hook_on", 0)         }                   case '4':         {             client_cmd(id, "cal_menu")         }                   case '5':         {             client_cmd(id, "csdm_menu")         }                   case '6':         {             server_cmd("amx_nade *")         }                   case '7':         {             server_cmd("amx_unnade *")         }     }           return PLUGIN_HANDLED }
__________________
FatalisDK is offline
tbonus
Junior Member
Join Date: Apr 2006
Old 05-07-2006 , 14:27  
Reply With Quote #3

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':           {               client_cmd(id, "amx_tbmenu")         }                     case '2':           {                set_cvar_num("df_hook_on", 1)         }                     case '3':           {             set_cvar_num("df_hook_on", 0)         }                     case '4':           {               client_cmd(id, "amx_calmenu")         }                     case '5':           {               client_cmd(id, "csdm_menu")         }                     case '6':           {               client_cmd(id, "amx_nade *")         }                     case '7':           {               client_cmd(id, "amx_unnade *")         }       }             return PLUGIN_HANDLED   }
thanks fatalisdk, you put the wrong thing for cal menu and amx_nade is a client I think cause it worked after I changed it
tbonus is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-07-2006 , 15:38  
Reply With Quote #4

At least show him what he did what and what you did to fix it.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
tbonus
Junior Member
Join Date: Apr 2006
Old 05-07-2006 , 19:08  
Reply With Quote #5

me show fatalis or fatalis show me?
tbonus is offline
FatalisDK
Senior Member
Join Date: Mar 2006
Location: bacon
Old 05-07-2006 , 19:09  
Reply With Quote #6

You show me, and I already know what you meant so no need.
__________________
FatalisDK is offline
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 05-07-2006 , 19:26  
Reply With Quote #7

v3x meant for you to atleast add comments in the parts where you were supposed to tell him what he did wrong, and how you fixed it so that he can understand.
Peli is offline
Send a message via MSN to Peli
tbonus
Junior Member
Join Date: Apr 2006
Old 05-07-2006 , 20:18  
Reply With Quote #8

I understand..we talked on xfire.
tbonus is offline
raa
Senior Member
Join Date: Oct 2005
Old 05-12-2006 , 08:23  
Reply With Quote #9

Quote:
Originally Posted by tbonus
I understand..we talked on xfire.
and for the rest of the community?



People forget what forums are all about these days.. jeezzz
raa is offline
Reply



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