Raised This Month: $32 Target: $400
 8% 

[Help] Menu wont show


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
elmedin
Senior Member
Join Date: Nov 2013
Location: Bruh
Old 04-08-2018 , 16:20   [Help] Menu wont show
Reply With Quote #1

Hey im having this problem with this menu .. when i press M this menu wont show


PHP Code:
#include <amxmodx>
#include <cstrike>

new const menu_names[][] =
{
    
"",
    
"Change Race",
    
"Weapon Menu",
    
"Select skills",
    
"Player skills",
    
"Top 15",
    
"Rank",
    
"Respawn"
}

new const 
menu_cmds[][] =
{
    
"",
    
"changerace",
    
"guns",
    
"selectskill",
    
"playerskills",
    
"top15",
    
"Rank",
    
"guns",    
    
"respawn"
}

public 
plugin_init()
{
    
register_plugin("VZBB Addon : Commands Menu","1.0","<VeCo>")
    
    
register_clcmd("jointeam","m_menu")
    
register_clcmd("chooseteam","m_menu")
}

public 
m_menu(id)
{
    if(
cs_get_user_team(id) == CS_TEAM_SPECTATOR || cs_get_user_team(id) == CS_TEAM_UNASSIGNED) return PLUGIN_CONTINUE
    
    show_command_menu
(id)
    
    return 
PLUGIN_HANDLED
}

public 
show_command_menu(id)
{
    static 
menui,i_str[3]
    
menu menu_create("VZBB Commands Menu:","command_menu_handler")
    
    for(
i=1;i<9;i++)
    {
        
num_to_str(i,i_str,2)
        
menu_additem(menu,menu_names[i],i_str)
    }
    
    
menu_display(id,menu)
}

public 
command_menu_handler(id,menu,item)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    static 
access,callbackinfo[3]
    
    
menu_item_getinfo(menu,itemaccessinfo,2_,_callback)
    
    
client_cmd(id,"say /%s",menu_cmds[str_to_num(info)])
    
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED

elmedin is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 04-08-2018 , 16:32   Re: [Help] Menu wont show
Reply With Quote #2

Try

PHP Code:
#include <amxmodx> 

enum dMenuData
{
    
szItemName[32],
    
szItemCommand[32]
}

new const 
g_szMenuData[][dMenuData] = 

    {
"Change Race""changerace"},
    {
"Weapon Menu",  "guns"},
    {
"Select skills",  "selectskill"},
    {
"Player skills",  "playerskills"},
    {
"Top 15",  "top15"},
    {
"Rank",  "rank"},
    {
"Guns""guns"},
    {
"Respawn""guns"}


public 
plugin_init() 

    
register_plugin("VZBB Addon : Commands Menu","1.0","<VeCo>"
    
    
register_clcmd("jointeam","m_menu"
    
register_clcmd("chooseteam","m_menu"


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 


public 
show_command_menu(id

    new 
iMenu menu_create("VZBB Commands Menu:","command_menu_handler"
    
    for(new 
i;sizeof g_szMenuData;i++) 
    { 
        
menu_additem(iMenug_szMenuData[i][szItemName]) 
    } 
    
    
menu_display(idiMenu


public 
command_menu_handler(idiMenuiItem

    if(
iItem == MENU_EXIT
    { 
        
menu_destroy(iMenu
        return
    } 
    
    
client_cmd(id"say /%s"g_szMenuData[iItem][szItemCommand]) 
    
    
menu_destroy(iMenu

__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
elmedin
Senior Member
Join Date: Nov 2013
Location: Bruh
Old 04-08-2018 , 16:35   Re: [Help] Menu wont show
Reply With Quote #3

Thanks bro but can you also make Change Team on this menu?
elmedin is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 04-08-2018 , 16:39   Re: [Help] Menu wont show
Reply With Quote #4

Not sure what you're talking about, can you give more details?
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
elmedin
Senior Member
Join Date: Nov 2013
Location: Bruh
Old 04-08-2018 , 16:49   Re: [Help] Menu wont show
Reply With Quote #5

Yes yes

{"Change Race", "changerace"},
{"Weapon Menu", "guns"},
{"Select skills", "selectskill"},
{"Player skills", "playerskills"},
{"Top 15", "top15"},
{"Rank", "rank"},
{"Guns", "guns"},
--->>>> {"Change Team", "idk what to write here"}

I want this to change team between CT and T in there
elmedin is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 04-08-2018 , 17:29   Re: [Help] Menu wont show
Reply With Quote #6

The command without the '/'.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
elmedin
Senior Member
Join Date: Nov 2013
Location: Bruh
Old 04-08-2018 , 17:31   Re: [Help] Menu wont show
Reply With Quote #7

yes only for that example press M and then 7 to change team
elmedin is offline
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 04-09-2018 , 17:37   Re: [Help] Menu wont show
Reply With Quote #8

just for choose team command is chooseteam and jointeam so make one command for open menu chooseteam to work with keyword M and jointeam command for the menu...
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
elmedin
Senior Member
Join Date: Nov 2013
Location: Bruh
Old 04-10-2018 , 18:36   Re: [Help] Menu wont show
Reply With Quote #9

Quote:
Originally Posted by D3XT3R View Post
just for choose team command is chooseteam and jointeam so make one command for open menu chooseteam to work with keyword M and jointeam command for the menu...
Yes but commands work only with cmd... is there anyplugin that is /jointeam so you can switch teams? i can combine that with the plugin
elmedin is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 04-10-2018 , 20:58   Re: [Help] Menu wont show
Reply With Quote #10

You're in Scripting Help, you should do things by yourself.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
Reply


Thread Tools
Display Modes

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 07:17.


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