Raised This Month: $ Target: $400
 0% 

Menu on command chooseteam


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
neverminde
Senior Member
Join Date: Feb 2011
Location: St.Piter
Old 04-27-2013 , 16:20   Menu on command chooseteam
Reply With Quote #1

I've tried make server menu on command chooseteam like in ZP with possibilty to changeteam though this menu, but using return PLUGIN_CONTINUE block class choosing.
I know there are exist solutions, but i can't google it.
PHP Code:
#include <amxmodx>

new isJoin[33]

public 
plugin_init()
{
    
register_plugin"PLUGIN""VERSION""AUTHOR" )
    
register_clcmd "realjoin""cmdReal" )
    
register_clcmd "jointeam""cmdJoin" )
    
register_clcmd "server_menu""cmdMenu")
}

public 
client_putinserver(id)
{
    
isJoin[id]=0
}

public 
cmdReal(id)
{
    
isJoin[id]=1
}

public 
cmdJoin(id)
{
    if ( 
isJoin[id]==)
    {
        
client_cmdid"server_menu" )
        return 
PLUGIN_HANDLED
    
}
    
    
isJoin[id]=0
    
return PLUGIN_CONTINUE
}

public 
cmdMenu(id)
{    
    new 
Menu menu_create("\ynew test menu""menu_handler")
        
    
menu_additem(Menu"Change Team""1"0)
    
    
menu_display(idMenu0)
    
    return 
PLUGIN_HANDLED
}

public 
menu_handler(id,menu,item)
{
    if(
item == MENU_EXIT)
    {
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED
    
}
    
    new 
data[6], iName[64], accesscallback
    menu_item_getinfo
(menuitemaccessdata5iName63callback)
    
    new 
key str_to_num(data)
    switch(
key)
    {
        case 
1
        {
            
client_cmdid"realjoin; jointeam" )
        }
    }

    new 
oldmenunewmenumenupage
    player_menu_info
(idoldmenunewmenumenupage)
    return 
PLUGIN_CONTINUE

neverminde is offline
 



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 10:48.


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