Raised This Month: $ Target: $400
 0% 

[menu not working]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Da_sk8rboy
Veteran Member
Join Date: Jul 2006
Old 12-01-2006 , 16:02   [menu not working]
Reply With Quote #1

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #define PLUGIN "Model_Me_Mod123" #define VERSION "1.00a" #define AUTHOR "Da_sk8rboy" new g_Switch; new menu[192]; new keys = MENU_KEY_0 | MENU_KEY_1 | MENU_KEY_2 | MENU_KEY_3 | MENU_KEY_4 public plugin_init() {                 register_plugin(PLUGIN, VERSION, AUTHOR);       register_concmd("amx_modelme", "show_menu");     register_menu("menu_show",1023,"menu_choose");     g_Switch = register_cvar("cm_switch","1");     register_cvar("cm_modelme1", "5000")     register_cvar("cm_modelme2", "8000")     register_cvar("cm_modelme3", "16000") } public menu_show(id) {               if(get_pcvar_num(g_Switch)==0)     {         return PLUGIN_HANDLED;     }else{         format(menu,191,"[AMX] Models^n1. Model1^n.2 Model2^n3. Model3^n^n.Exit");         show_menu(id,keys,menu,-1,"show_menu");         return PLUGIN_CONTINUE;     }     return PLUGIN_HANDLED; } public choose_menu(id,key) {     switch(key)     {                 case 0 : cs_set_user_model(id, "modelme2")             case 1 : cs_set_user_model(id, "modelme3")             case 2 : cs_set_user_model(id, "modelme1")             }       return PLUGIN_HANDLED; } public plugin_precache() {               precache_model("models/player/model1/model1.mdl");     precache_model("models/player/model2/model2.mdl");     precache_model("models/player/model3/model3.mdl"); }

Menu will not come up when i use the cmd, anyone know whats wrong? it compiles ok, no errors!
__________________
i stop around here and there.
Da_sk8rboy is offline
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 12-01-2006 , 16:06   Re: [menu not working]
Reply With Quote #2

Code:
 register_menu("menu_show",1023,"menu_choose");
should be
Code:
 register_menu(register_menuid("show_menu"), 1023, "choose_menu)

and your show_menu function does not exist: register_concmd("amx_modelme", "show_menu");
__________________
All you need to change the world is one good lie and a river of blood
P34nut is offline
Da_sk8rboy
Veteran Member
Join Date: Jul 2006
Old 12-01-2006 , 16:28   Re: [menu not working]
Reply With Quote #3

So i would change:
show_menu(id,keys,menu,-1,"show_menu");
to

Code:
show_menu(id,keys,menu,-1,"menu_show")
[FONT=normal,'Times New Roman']
[/FONT]
__________________
i stop around here and there.

Last edited by Da_sk8rboy; 12-01-2006 at 16:30.
Da_sk8rboy is offline
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 12-01-2006 , 16:31   Re: [menu not working]
Reply With Quote #4

what??


btw do you use amxx studio? there is a handy menu generator for people like you..
__________________
All you need to change the world is one good lie and a river of blood
P34nut is offline
Old 12-01-2006, 16:33
Da_sk8rboy
This message has been deleted by Da_sk8rboy.
The Specialist
BANNED
Join Date: Nov 2006
Old 12-01-2006 , 16:33   Re: [menu not working]
Reply With Quote #5

actaully peanut using register_menu is valid. if you look at the source file for some of the ammxmodx base plugins youll see it there. I also use it.
The Specialist is offline
Send a message via AIM to The Specialist
Da_sk8rboy
Veteran Member
Join Date: Jul 2006
Old 12-01-2006 , 16:34   Re: [menu not working]
Reply With Quote #6

yes i use amx studios. thats all i use, specialist helped me with the menu
__________________
i stop around here and there.
Da_sk8rboy is offline
LittleDude
Member
Join Date: Dec 2004
Location: Selah, WA
Old 12-01-2006 , 20:06   Re: [menu not working]
Reply With Quote #7

you're not even calling the correct menu using your code
__________________
It is stupid to be stupid, and stupid to not be stupid
LittleDude is offline
Send a message via AIM to LittleDude
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 06:51.


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