Raised This Month: $ Target: $400
 0% 

Menu help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 11-25-2010 , 20:32   Re: Menu help
Reply With Quote #1

Not sure what you're trying to do with this:
Code:
show_menu(id, 0, "work", 1, "#Team_Select_Spect")
Try removing it.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Racoon
Senior Member
Join Date: Mar 2008
Location: Ukraine
Old 11-26-2010 , 06:04   Re: Menu help
Reply With Quote #2

Quote:
Originally Posted by Emp` View Post
Not sure what you're trying to do with this:
Code:
show_menu(id, 0, "work", 1, "#Team_Select_Spect")
Try removing it.
Ok, I've removed set_task and the menu disappers as it should, but I found another problem... The radio commands and buymenu are blocked for some reason. When I press "z", "x" or "c" the menu comes up again instead of radio\buy menu.
PHP Code:
public plugin_init() 

    
register_plugin(PLUGIN,VERSION,AUTHOR
    
register_event("ShowMenu""blockteams""b""3=#Team_Select_Spect"


public 
client_connect(id

    
set_user_info(id"_vgui_menus""0"); 


public 
blockteams(id

    new 
menu menu_create("\yChoose a team:""menu_handler"
    
menu_additem(menu"\wMuggers""1"0)     
    
menu_additem(menu"\wCops""2"0
    
menu_additem(menu"\wAuto-Select""5"0
    
menu_additem(menu"\wSpectate""6"0
    
menu_addblank(menu,-1)      
    
menu_additem(menu"\wDisconnect""7"0)     
    
menu_additem(menu"\wMusic""8"0)     
    
menu_display(idmenu0


public 
menu_handler(idmenuitem) { 
    new 
team get_user_team(id
    if (
item == MENU_EXIT) { 
        
menu_destroy(menu
        return 
PLUGIN_HANDLED 
    

     
    new 
data[6], iName[64
    new 
accesscallback 
    menu_item_getinfo
(menuitemaccessdata,5iName63callback
    new 
key str_to_num(data

    switch(
key) { 
         
        case 
1:{ 
            if (
team != 1) { 
                
engclient_cmd(id"jointeam""1"
                
engclient_cmd(id"menuselect","5"
            } 
        } 
         
        case 
2:{ 
                    if (
team != 2) { 
                
engclient_cmd(id"jointeam""2"
                
engclient_cmd(id"menuselect","5"
            } 
        } 
         
        case 
5:    menu_handler(idmenurandom_num(01)) 
                 
        case 
6:    engclient_cmd(id"jointeam""6"

        case 
7:    client_cmd(id"disconnect"

        case 
8:    client_cmd(id"say /music"
        }
         
    
show_menu(id0"^n"1

    return 
PLUGIN_HANDLED 


Last edited by Racoon; 11-26-2010 at 06:44.
Racoon is offline
Send a message via ICQ to Racoon
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 11:16.


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