Raised This Month: $ Target: $400
 0% 

Why don't work this?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 01-03-2014 , 19:53   Re: Why don't work this?
Reply With Quote #5

Quote:
Originally Posted by matthew16 View Post
PHP Code:
public ChooseTeamidmenuitem )
{
    switch( 
item )
    {
        case 
1:
        {
            
cs_set_user_team(idCS_TEAM_T)
            
user_kill(id1)
            
        }
        case 
2:
        {        
            
cs_set_user_team(idCS_TEAM_CT)
            
user_kill(id1)        
        }
        case 
3:
        {
            
cs_set_user_team(idCS_TEAM_SPECTATOR)
            
user_kill(id1)    
        }    
    }
    
menu_destroymenu );
    return 
PLUGIN_HANDLED;

Try this:
PHP Code:
public ChooseTeam(idmenuitem)
{
    if(
item == MENU_EXIT)
        return 
PLUGIN_HANDLED
    
    
new info[3]
    new 
accesscallback
    menu_item_getinfo
(menuitemaccessinfo2__callback)
    new 
key str_to_num(info)
    
    switch(
key)
    {
        case 
1:
        {
            
cs_set_user_team(idCS_TEAM_T)
            
user_kill(id1)
        }
        
        case 
2:
        {
            
cs_set_user_team(idCS_TEAM_CT)
            
user_kill(id1)
        }
        
        case 
3:
        {
            
cs_set_user_team(idCS_TEAM_SPECTATOR)
            
user_kill(id1)
        }
    }
    
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED


Quote:
Originally Posted by matthew16 View Post
[PHP]
PHP Code:
public HookCmdChooseTeam(id){
        
Menu(id);
    return 
PLUGIN_HANDLED;    
        
//dont show a menu..: (

If you dont show Menu(id) function, we cant tell you the problem.
__________________
Jhob94 is online now
 



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:08.


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