Raised This Month: $ Target: $400
 0% 

Switching player's team. Will this work? Urgent Help!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
devWaleed
Member
Join Date: Apr 2013
Location: Karachi, Pakistan
Old 07-20-2013 , 06:29   Switching player's team. Will this work? Urgent Help!
Reply With Quote #1

I know this is very awful code for team balancing but what do you think? Will this work?


PHP Code:
    new t_countct_countnumplayers[32], tempid;

    new 
ct_count    =    get_playersplayersnum"ae""CT" );  //Get ct count
    
new t_count    =    get_playersplayersnum"ae""T" ); //Get t count
    
if(t_count ct_count){
        
// T - CT
        
new tcount    =    t_count ct_count
        if(
tcount 1){
                        
//If there are more than 1 player which makes team unequal.
            // There are more Ts.then allowed!
            
while(tcount>1){
                new 
t_count    =    get_playersplayersnum"ae""T" );
                for(new 
0i<tcounti++){
                    
tempid    =    players[i];
                    
cs_set_user_team(tempidCS_TEAM_CT); //Change Player's team...
                    
i++;
                }
                
tcount++;
            }
        }
    } 
-TY!

Last edited by devWaleed; 07-20-2013 at 06:31.
devWaleed is offline
Send a message via Skype™ to devWaleed
 



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 06:27.


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