Raised This Month: $ Target: $400
 0% 

last terrorist help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-05-2009 , 23:08   Re: last terrorist help
Reply With Quote #3

Untested
PHP Code:
//Usage
new iLastT GetLastPlayerCS_TEAM_T );
    
//If iLastT > 0 then there is only one T left and his id is stored in iLastT
if ( iLastT 
{
        
}
//If iLastT = 0 there are either no T's or more than one
else
{
    
}

//the function
public GetLastPlayerCsTeams:Team )
{
    new 
iPlayers32 ] , iNum id iLastT;
    
    
get_playersiPlayers iNum );
    
    for ( new 
iNum i++ )
    {
        
id iPlayers];
        
        if ( 
is_user_aliveid ) && ( cs_get_user_teamid ) == Team ) )
        {
            if ( 
iLastT )
                return 
0;
                
            
iLastT id;
        }
    }
    
    return 
iLastT;

__________________
Bugsy 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 22:41.


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