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

LAST Ct Move For Tr


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kendra
Senior Member
Join Date: Feb 2011
Location: Chile
Old 01-24-2015 , 20:30   LAST Ct Move For Tr
Reply With Quote #1

hi my plugin dont work why?


I want to move to the last ct, at the end of round

PHP Code:
register_logevent("logevent_roundEnd"2"1=Round_End")

public 
logevent_roundEnd(){
    new 
tt    
    tt 
Terroristas()
    
    new 
ct
    ct 
Counter( )
    
    if( 
ct == 3){
        
//engclient_cmd(id, "jointeam", "2")
        //engclient_cmd(id, "joinclass", "1")
        
check_time()
        
ColorChat(0GREEN"fuiste trasnferido por balancimiento (reviso mensaje 1)")
    }
}

Terroristas( )
{
new 
iTerroristas    
    
iTerroristas 
0
new Index

for( Index 1Index <= MaxiumUsersIndex++ )
{
    if( 
is_user_connectedIndex ) && get_user_teamIndex ) == )
        
iTerroristas++
    }
return 
iTerroristas
}  

Counter( )
{
new 
iCt
    
iCt 
0
new Index

for( Index 1Index <= MaxiumUsersIndex++ )
{
    if( 
is_user_connectedIndex ) && get_user_teamIndex ) == )
        
iCt++
    }
return 
iCt
}

public 
check_time()
{
    new 
Players[32], iNum;
    
get_players(PlayersiNum"ae""CT")
    
    for(new 
1<= get_maxplayers(); i++)
    {
        new 
id Players[i]
        if(
get_user_time(id) < get_user_time(i))
        {
            if(
is_user_connected(id)){
                
cs_set_user_team(idCS_TEAM_T)
                
ColorChat(0GREEN"fuiste trasnferido por balancimiento automatico3 (reviso mensaje 2)")
            }
        }
    }


Last edited by kendra; 01-24-2015 at 20:30.
kendra is offline
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 15:28.


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