Raised This Month: $ Target: $400
 0% 

hookmenu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 03-18-2005 , 16:37   hookmenu
Reply With Quote #1

this is a plugin for hookmenu you can use it when you type amx_hookmenu in console and you will see a hookmenu
with all commands I only added 1 to see if it works but it doesn't so
plz help
Code:
#include <amxmodx> #include <amxmisc> public plugin_init() {     register_plugin("Hook Menu","1.0","[iwek]Nightscream")     register_concmd("amx_hook_on","cmdhook_on",ADMIN_MENU,"turns hookmod on and off")     register_menucmd(register_menuid("\yHookMenu"), 1023, "actionHookmenu")         return PLUGIN_CONTINUE } /*-------------------------------------Hook on--------------------------------------------------*/ public Hook_on() {     server_cmd("DF_hook_on") } /*-------------------------------------Main Menu------------------------------------------------*/ public actionHookmenu(id, key) {     switch(key) {         case 0: {             client_cmd(id, "amx_hookmenu")         }         case 2: {             client_cmd(id, "amx_hookmenu")             log_amx("[Hookmenu] ^"%s<%d><%s><>^" Turns Hook mod on and off", name, get_user_userid(id), authid)         }     }     return PLUGIN_HANDLED } public showHookmenu(id, level, cid) {     if (!cmd_access(id, level, cid, 1))     return PLUGIN_HANDLED     new menu[256]     format(menu, 255, "\yHookMenu^n^n\w1. turns hook on and off^n\w0. Exit")     show_menu(id, ((1<<0)|(1<<1)), menu)         return PLUGIN_HANDLED }
__________________
- Bye bye!
nightscreem is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 03-18-2005 , 20:37  
Reply With Quote #2

Code:
#include <amxmodx> #include <amxmisc> public plugin_init() {     register_plugin("Hook Menu","1.0","[iwek]Nightscream")     register_concmd("amx_hook_on","cmdhook_on",ADMIN_MENU,"turns hookmod on and off")     register_menucmd(register_menuid("\yHookMenu"), 1023, "actionHookmenu")         return PLUGIN_CONTINUE } /*-------------------------------------Hook on--------------------------------------------------*/ // Don't need this! /*public Hook_on() {     server_cmd("DF_hook_on") }*/ /*-------------------------------------Main Menu------------------------------------------------*/ public actionHookmenu(id, key) {     switch(key) {         case 0: { // key 0 == number 1             set_cvar_num("DF_hook_on",1);             client_print(id,print_chat,"* HookMod is now on");         }         case 1: { // key 1 == number 2             set_cvar_num("DF_hook_on",0);             client_print(id,print_chat,"* HookMod is now off");         }     }     return PLUGIN_HANDLED } public showHookmenu(id, level, cid) {     if (!cmd_access(id, level, cid, 1))     return PLUGIN_HANDLED     new menu[256]     format(menu, 255, "\yHookMenu^n^n\w1. HookMod On^n\w2. HookMod Off^n^n\w0. Exit")     show_menu(id, MENU_KEY_1|MENU_KEY_2|MENU_KEY_0, menu)         return PLUGIN_HANDLED }
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 03-19-2005 , 11:06  
Reply With Quote #3

the DF_hook_on is working but when i type amx_hookmenu and pick 1 or 2 it closes and when i type amx_hookonmenu and push 1 or 2 it works great but when I type amx_hookgroundmenu and push 1 or 2 it the menu closes
Code:
#include <amxmodx> #include <amxmisc> public plugin_init() {     register_plugin("Hook Menu","1.0","[iwek]Nightscream")     register_clcmd("amx_hookmenu","CmdHookMenu",ADMIN_MENU, "- Displays The hookmenu")     register_clcmd("amx_hookonmenu","CmdHookOnMenu",ADMIN_MENU,"- Displays the hook on and off menu")     register_clcmd("amx_hookgroundmenu","CmdHookGroundMenu",ADMIN_MENU,"- Displays the ground menu")     register_menucmd(register_menuid("Hook Menu"),1023,"actionHookmenu")     register_menucmd(register_menuid("Hook on and off Menu"),1023,"actionHookonmenu")     register_menucmd(register_menuid("Hook ground Menu"),1023,"actionHookgroundmenu")     return PLUGIN_CONTINUE } /*-------------------------------------Main Menu------------------------------------------------*/ public actionHookmenu(id, key) {     switch(key) {         case 0: {             client_cmd(id,"amx_hookonmenu")         }         case 1: {             client_cmd(id,"amx_hookgroundmenu")         }     }     return PLUGIN_HANDLED } public CmdHookMenu(id, level, cid) {     if (!cmd_access(id, level, cid, 1))           return PLUGIN_HANDLED           new menu[256]     format(menu, 255, "\yHookmod menu^n^n\w1. Hook on and off menu^n\w2. Hook ground menu^n\w0. Exit")     show_menu(id,((1<<0)|(1<<1)|(1<<2)), menu)           return PLUGIN_HANDLED } /*--------------------------------Hook on and off Menu------------------------------------------*/ public actionHookonmenu(id,key) {     switch(key) {         case 0: {             set_cvar_num("DF_hook_on",0);             client_print(id,print_chat,"[HookMod]hook is now off");         }         case 1: {             set_cvar_num("DF_hook_on",1);             client_print(id,print_chat,"[HookMod]hook is now on");         }     }     return PLUGIN_HANDLED } public CmdHookOnMenu(id, level, cid) {     if (!cmd_access(id, level, cid, 1))           return PLUGIN_HANDLED     new menu[256]     format(menu, 255, "\yHook on and off Menu^n^n\w1. Hook off^n\w2. Hook on^n\w3. Back^n\w0. Exit")     show_menu(id,((1<<0)|(1<<1)|(1<<9)), menu)           return PLUGIN_HANDLED } /*---------------------------------Hook ground Menu---------------------------------------------*/ public actionHookgroundmenu(id,key) {     switch(key) {         case 0: {             set_cvar_num("DF_hook_ground",0);             client_print(id,print_chat,"[HookMod]players can't attach hooks on the ground");         }         case 1: {             set_cvar_num("DF_hook_ground",1);             client_print(id,print_chat,"[HookMod]players can attach hooks on the ground");         }     }     return PLUGIN_HANDLED } public CmdHookGroundMenu(id, level, cid) {     if (!cmd_access(id, level, cid, 1))           return PLUGIN_HANDLED     new menu[256]     format(menu, 255, "\yHook Ground Menu^n^n\w1. Hook ground off^n\w2. Hook ground on^n\w3. Back^n\w0. Exit")     show_menu(id,((1<<0)|(1<<1)|(1<<9)), menu)           return PLUGIN_HANDLED }
__________________
- Bye bye!
nightscreem is offline
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 03-20-2005 , 09:34  
Reply With Quote #4

plz help
or say if you don't get my question
__________________
- Bye bye!
nightscreem is offline
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 03-26-2005 , 07:31  
Reply With Quote #5

need help quik plz
__________________
- Bye bye!
nightscreem is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-26-2005 , 08:20  
Reply With Quote #6

Stop spamming and be patient, "plz"..
__________________
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
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 03-26-2005 , 10:07  
Reply With Quote #7

sry but no one want to help me so it was on the second page
__________________
- Bye bye!
nightscreem is offline
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 04-03-2005 , 07:53  
Reply With Quote #8

this isn't meant to be spam but common pls help i have another thing now not the whole menu but how can I make a menu that if you push the 1 key the command will get on if you push in the menu it will gives off
I hope you understand like in the statscfgmenu
__________________
- Bye bye!
nightscreem is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 04-03-2005 , 09:39  
Reply With Quote #9

Example:
Code:
#include <amxmodx> public plugin_init() {     register_plugin("My Menu", "0.1", "John Doe")     register_clcmd("say /menu", "showMenu",0, "Shows the menu for menu stuff")     register_menucmd(register_menuid("\yMy Menu:"), 1023, "myMenu")     return PLUGIN_CONTINUE } public showMenu(id) {     new szMenuBody[256]     new keys     new len = format(szMenuBody, 255, "\yMy Menu:^n")     len += format(szMenuBody[len], 255-len, "^n\w1. On")     len += format(szMenuBody[len], 255-len, "^n\w2. Off")     len += format(szMenuBody[len], 255-len, "^n^n\w0. Exit")     keys = (1<<0|1<<1|1<<9)         show_menu(id, keys, szMenuBody, -1)     return PLUGIN_CONTINUE } public myMenu(id, key) {     // Switch stuff ..     return PLUGIN_HANDLED }
__________________
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
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 04-03-2005 , 16:59  
Reply With Quote #10

thx for helping but not what i meant
i mean something like this
__________________
- Bye bye!
nightscreem 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 14:05.


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