Raised This Month: $12 Target: $400
 3% 

remove single player or single ID


Post New Thread Reply   
 
Thread Tools Display Modes
liryck
Senior Member
Join Date: Mar 2007
Location: Venezuela
Old 03-10-2010 , 13:43   Re: remove single player or single ID
Reply With Quote #11

here my fully menu_handled tell me if you need to show u more

PHP Code:
public menu_handler(idmenuitem)
 {
 new 
selectedct[32]
 new 
count
 
new ct_team;
 new 
flag 0;
 new 
t_team;
 new 
name[32]
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }

    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);

    
//Get the id of the player that was selected
    
new ptempid str_to_num(data);
    if(
ct_team >= && flag == 0){
        
flag 1
        menu_destroy
(menu);
            
AwesomeMenu(t_cap);
    return 
PLUGIN_HANDLED;
    }
    else
    {
         if(
cap_id == ct_cap && is_user_connected(ptempid))
         {
                     
cs_set_user_team(ptempidCS_TEAM_CT)
                     
get_user_name(ptempid,name,31)
                     
client_print(0,print_chat,"%s Has Sido Elegido Por el Capitan de los CT's",name)
        
                     new 
iIndex GetPlayerIndexptempid );
                     if ( 
iIndex > -
                    {
                          
selectedctcount++ ] = iPlayersiIndex ];
                          
iPlayersiIndex ] = iPlayers[ --iNum ];
                    }  
        
                     
ct_team++
                     
menu_destroy(menu);
                     
AwesomeMenu(t_cap)
                     return 
PLUGIN_HANDLED;
            
           }
    
         if(
cap_id == t_cap && is_user_connected(ptempid))
        {
              
cs_set_user_team(ptempid,CS_TEAM_T)
              
get_user_name(ptempid,name,31)
              
client_print(0,print_chat,"%s Has Sido Elegido Por el Capitan de los T's",name)
        
              new 
iIndex GetPlayerIndexptempid );
              if ( 
iIndex > -
             {
                    
selectedctcount++ ] = iPlayersiIndex ];
                    
iPlayersiIndex ] = iPlayers[ --iNum ];
             }  
        
                    
menu_destroy(menu);
                   
AwesomeMenu(ct_cap)
                    return 
PLUGIN_HANDLED;

         }   
              if(
iNum == 0){
                     
client_print(0,print_chat,"No Hay Mas Players")
                     
menu_destroy(menu);
                     return 
PLUGIN_HANDLED;
             }
    }
 }

GetPlayerIndexid )
{
    new 
name[32]
        for( new 
0iNumi++ )
        {
                if ( 
iPlayers] == id ){
                    return 
i;
                    
get_user_name(id,name,31)
                    
client_print(0,print_chat,"%s fue borrado de la lista",name)
                }
                return -
1
        }
        


Last edited by liryck; 03-10-2010 at 19:04.
liryck is offline
Send a message via MSN to liryck
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 23:12.


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