Raised This Month: $ Target: $400
 0% 

[SOLVED]gain problem with random player ;)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 10-23-2009 , 11:40   Re: again problem with random player ;)
Reply With Quote #4

PHP Code:
HeyBitch( ) {
    if( 
Some-Random-Checks-Goes-Here ) {
        new 
iPlayers32 ], iCount;
        
        for( new 
1<= g_iMaxplayersi++ ) {
            if( !
is_user_connected) )
                continue;
            
            switch( 
cs_get_user_team) ) {
                case 
CS_TEAM_T : if( is_user_alive) ) iPlayersiCount++ ] = i;
                case 
CS_TEAM_CTcs_set_user_teamiCS_TEAM_T );
            }
        }
        
        if( !
iCount ) {
            
// No alive terrorists
            
            
return;
        }
        
        new 
iPlayer = ( iCount == iPlayers] : iPlayersrandomiCount ) ] );
        
        
cs_set_user_teamiPlayerCS_TEAM_CT );
        
        
// Your stuff
    
}

__________________
xPaw is offline
 



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 17:34.


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