Raised This Month: $ Target: $400
 0% 

Why don't work this?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
matthew16
Junior Member
Join Date: Dec 2013
Old 01-03-2014 , 17:26   Why don't work this?
Reply With Quote #1

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;

and

PHP Code:
public HookCmdChooseTeam(id){
        
Menu(id);
    return 
PLUGIN_HANDLED;    
        
//dont show a menu..: (

matthew16 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-03-2014 , 17:49   Re: Why don't work this?
Reply With Quote #2

What are you trying to do and where is the rest of your code?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-03-2014 , 17:54   Re: Why don't work this?
Reply With Quote #3

Show the full code (attach your plugin).
__________________
fysiks is offline
matthew16
Junior Member
Join Date: Dec 2013
Old 01-03-2014 , 19:43   Re: Why don't work this?
Reply With Quote #4

if i sent private message? u need me?
matthew16 is offline
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
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 10:08.


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