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

Solved [New ] GetAlive CT and T By : marcelowzd


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
FonixPro20
Member
Join Date: Mar 2018
Old 03-23-2018 , 22:24   [New ] GetAlive CT and T By : marcelowzd
Reply With Quote #1

Hi,

Thanks To marcelowzd

Have Fun ,

PHP Code:
public fnGetAliveszTeam[ ] ) // szTeam CAN BE "CT" or "TERRORIST"
{
    new 
iPlayers32 ], iNumiCount;

    
//get_players_ex( iPlayers, iNum, GetPlayers_ExcludeDead | GetPlayers_MatchTeam, szTeam ); // AMXX 1.8.3
    
get_playersiPlayersiNum"ae"szTeam ); // AMXX 1.8.2

    
for( new 0iNumi++ )
        
iCount++;

    return 
iCount;
}

public 
fnGetAliveiTeam // Without CSTRIKE -> iTeam can be 0 = UNASSIGNED - 1 = TERRORIST 2 - CT 3 - SPECTATOR
{
    new 
iMax get_maxplayers( );
    new 
iCount 0;

    for( new 
iClient 1iClient iMaxiClient++ )
        if( 
is_user_aliveiClient ) )
            if( 
get_user_teamiClient ) == iTeam )
                
iCount++;

    return 
iCount;
}

public 
fnGetAliveCsTeams:csTeam // csTeam can be CS_TEAM_CT, CS_TEAM_T, CS_TEAM_UNASSIGNED, CS_TEAM_SPECTATOR
{
    new 
iMax get_maxplayers( );
    new 
iCount 0;

    for( new 
iClient 1iClient iMaxiClient++ )
        if( 
is_user_aliveiClient ) )
            if( 
cs_get_user_teamiClient ) == csTeam )
                
iCount++;

    return 
iCount;


Last edited by FonixPro20; 03-24-2018 at 01:44.
FonixPro20 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 07:55.


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