Raised This Month: $ Target: $400
 0% 

[HELP] Help me with code.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 09-28-2011 , 13:55   [HELP] Help me with code.
Reply With Quote #1

Hello, I found this script a few commands are not recognized as moveCT ... Had some command to replace it?

PHP Code:
public RandomCpt()   
{   
    new 
players[32], pnumtempid;   
       
    
get_players(playerspnum"ch");   

    for( new 
ii<pnumi++ )   
    {   
        
tempid players[i];   
        
cs_set_user_team(tempidCS_TEAM_SPECTATOR)   
    }                   
           
    new 
random_num(0pnum)   
       
    
cs_set_user_team(players[z], CS_TEAM_T)   
       
    new 
random_num(0pnum)   
       
    while (
== z)   
    {   
        
random_num(0pnum)   
    }   
       
    
cs_set_user_team(players[q], CS_TEAM_CT)   
       
    
client_print(0print_chat"%s Random captains were chosen, The captains will now choose their teammates.")   
    
client_print(0print_chat"%s Terrorists's Captain, please choose first.")   
       
     
Tpick() 
}   

public 
Tpick()   
{   
       
    new 
players[10], pnumtempid;   
           
    
get_players(playerspnum"ch");   
       
    for( new 
ii<pnumi++ )   
    {   
        
tempid players[i];   
        if (
cs_get_user_team(tempid) == CS_TEAM_T)   
        {   
            
cptT tempid   
        
}   
           
        else if (
cs_get_user_team(tempid) == CS_TEAM_CT)   
        {   
            
cptCT tempid   
        
}   
    }   
       
           
     
moveCT() 
}   

public 
moveT(cptT)   
{   
    
    new 
menu menu_create("Choose a Player to move to your team:""moveT_menu");    
    new 
players[32], pnumtempid;    
    new 
szName[32], szTempid[10];    
    new 
pickisdone   
    
    get_players
(playerspnum"ch");    
           
    for( new 
ii<pnumi++ )    
    {    
        
tempid players[i];   
           
        if (
cs_get_user_team == CS_TEAM_SPECTATOR)   
        {   
            
get_user_name(tempidszName31);    
            
num_to_str(tempidszTempid9);    
            
menu_additem(menuszNameszTempid0);   
            
pickisdone++   
        }   
    }    
       
    if (
pickisdone == 0)   
    {   
        
set_task(0.1"StartMatch")   
    }   
    
    
menu_display(cptTmenu);    
    return 
PLUGIN_HANDLED;    
}   

public 
moveT_menu(idmenuitem)    
{    
    if( 
item == MENU_EXIT )    
    {    
        
moveT()   
        return 
PLUGIN_HANDLED;    
    }    
    
    new 
data[6], iName[64];    
    new 
accesscallback;    
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);    
    
    new 
tempid str_to_num(data);   
    new 
name[32]   
       
    
get_user_name(tempidname31)   
       
    
cs_set_user_team(tempidCS_TEAM_T)   
    
    
client_print(0print_chat"%s %s was chosen to be in Terrorists Team by the Terrorists's Captain."name)   
    
menu_destroy(menu);   
    
moveCT() 
    return 
PLUGIN_HANDLED   
}    


public 
moveCT(cptCT)   
{   
    
    new 
menu menu_create("Choose a Player to move to your team:""moveCT_menu");    
    new 
players[32], pnumtempid;    
    new 
szName[32], szTempid[10];    
       
    
get_players(playerspnum"ch");    
           
    for( new 
ii<pnumi++ )    
    {    
        
tempid players[i];   
           
        if(
cs_get_user_team(tempid) == CS_TEAM_SPECTATOR)   
        {   
            
get_user_name(tempidszName31);    
            
num_to_str(tempidszTempid9);    
            
menu_additem(menuszNameszTempid0);   
        }   
    }    
    
    
menu_display(cptCTmenu);    
    return 
PLUGIN_HANDLED;    
}   

public 
moveCT_menu(idmenuitem)    
{    
    if( 
item == MENU_EXIT )    
    {    
        
moveCT()
        return 
PLUGIN_HANDLED;    
    }    
    
    new 
data[6], iName[64];    
    new 
accesscallback;    
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);    
    
    new 
tempid str_to_num(data);   
    new 
name[32]   
       
    
get_user_name(tempidname31)   
       
    
cs_set_user_team(tempidCS_TEAM_T)   
    
    
client_print(0print_chat"%s %s was chosen to be in Counter-Terrorists Team by the Counter-Terrorists's Captain."name)   
    
menu_destroy(menu);   
    
set_task(0.1"move_t")   
    return 
PLUGIN_HANDLED 
__________________
kramesa is offline
 


Thread Tools
Display Modes

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 19:43.


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