Raised This Month: $51 Target: $400
 12% 

[Help] Menu wont show


Post New Thread Reply   
 
Thread Tools Display Modes
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 04-11-2018 , 15:30   Re: [Help] Menu wont show
Reply With Quote #11

Quote:
Originally Posted by EFFx View Post
You're in Scripting Help, you should do things by yourself.
cmon will take 2 sec for remake this simple menu...

Code:
#include <amxmodx> public plugin_init() {     register_plugin("VZBB Addon : Commands Menu","1.0","<VeCo>")         register_clcmd("chooseteam","m_menu") } public m_menu(id) {     if(1 <= get_user_team(id) <= 2)     {         show_command_menu(id)     }     else     {         client_print(id, print_chat, "[AMXX]: You can not open this menu!")     }     return PLUGIN_HANDLED } public show_command_menu(id) {     new menu = menu_create("VZBB Commands Menu:","command_menu_handler")             menu_additem(menu, "Change Team")     menu_additem(menu, "Change Race")     menu_additem(menu, "Weapon Menu")     menu_additem(menu, "Select skills")     menu_additem(menu, "Player skills")     menu_additem(menu, "Top 15")     menu_additem(menu, "Rank")     menu_additem(menu, "Guns")     menu_additem(menu, "Respawn")         menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);         menu_display(id, menu, 0);         return PLUGIN_HANDLED; } public command_menu_handler(id, menu, item) {     if(item == MENU_EXIT)     {         menu_destroy(menu);         return PLUGIN_HANDLED;     }         switch(item)     {         case 0: { client_cmd(id, "jointeam"); }         case 1: { client_cmd(id, "say /changerace"); }         case 2: { client_cmd(id, "say /guns"); }         case 3: { client_cmd(id, "say /selectskill"); }         case 4: { client_cmd(id, "say /playerskills"); }         case 5: { client_cmd(id, "say /top15"); }         case 6: { client_cmd(id, "say /rank"); }         case 7: { client_cmd(id, "say /guns"); }         case 8: { client_cmd(id, "say /guns"); }        }     menu_destroy(menu);     return PLUGIN_HANDLED;  }
__________________

Last edited by D3XT3R; 04-12-2018 at 05:59.
D3XT3R is offline
Send a message via Skype™ to D3XT3R
elmedin
Senior Member
Join Date: Nov 2013
Location: Bruh
Old 04-12-2018 , 05:19   Re: [Help] Menu wont show
Reply With Quote #12

Quote:
Originally Posted by D3XT3R View Post
cmon will take 2 sec for remake this simple menu...

Code:
#include <amxmodx> public plugin_init() {     register_plugin("VZBB Addon : Commands Menu","1.0","<VeCo>")         register_clcmd("chooseteam","m_menu") } public m_menu(id) {     if(1 <= get_user_team(id) <= 2)     {         show_command_menu(id)     }     else     {         client_print(id, print_chat, "[AMXX]: You can not open this menu!")     }     return PLUGIN_HANDLED } public show_command_menu(id) {     new menu = menu_create("VZBB Commands Menu:","command_menu_handler")         new call = menu_makecallback("Call_Back")         menu_additem(menu, "Change Team")     menu_additem(menu, "Change Race")     menu_additem(menu, "Weapon Menu")     menu_additem(menu, "Select skills")     menu_additem(menu, "Player skills")     menu_additem(menu, "Top 15")     menu_additem(menu, "Rank")     menu_additem(menu, "Guns")     menu_additem(menu, "Respawn")         menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);         menu_display(id, menu, 0);         return PLUGIN_HANDLED; } public Call_Back(id, menu, item)     return ITEM_DISABLED; public command_menu_handler(id, menu, item) {     if(item == MENU_EXIT)     {         menu_destroy(menu);         return PLUGIN_HANDLED;     }         switch(item)     {         case 0: { client_cmd(id, "jointeam"); }         case 1: { client_cmd(id, "say /changerace"); }         case 2: { client_cmd(id, "say /guns"); }         case 3: { client_cmd(id, "say /selectskill"); }         case 4: { client_cmd(id, "say /playerskills"); }         case 5: { client_cmd(id, "say /top15"); }         case 6: { client_cmd(id, "say /rank"); }         case 7: { client_cmd(id, "say /guns"); }         case 8: { client_cmd(id, "say /guns"); }        }     menu_destroy(menu);     return PLUGIN_HANDLED;  }
Thanks <3 but im having an error

warning 204: symbol is assigned a value that is never used: "call"
elmedin is offline
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 04-12-2018 , 05:59   Re: [Help] Menu wont show
Reply With Quote #13

Try again i fixet code also warnings are nothing
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
elmedin
Senior Member
Join Date: Nov 2013
Location: Bruh
Old 04-12-2018 , 06:14   Re: [Help] Menu wont show
Reply With Quote #14

Aight works <3 thanks
elmedin is offline
polimpo4
Member
Join Date: Jan 2017
Old 04-16-2018 , 01:26   Re: [Help] Menu wont show
Reply With Quote #15

First Of All I didn't Even Tried But Just By Reading The Code... If You Change To Spectator... Would You Be Able To Open The Menu Again ? ;) Think About It... ;) ... You May Change That Part

PHP Code:
public m_menu(id

    if(
<= get_user_team(id) <= 2)
    {
        
show_command_menu(id
    }
    else
    {
        
client_print(idprint_chat"[AMXX]: You can not open this menu!")
    }
    return 
PLUGIN_HANDLED 


Last edited by polimpo4; 04-16-2018 at 02:25. Reason: errors
polimpo4 is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 04-16-2018 , 03:29   Re: [Help] Menu wont show
Reply With Quote #16

Dextar should have a pretty big reason beyond his MENU_EXIT from not being included on switch().
__________________
Relaxing 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 18:15.


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