View Single Post
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 08-09-2022 , 17:39   Re: [CS:GO] How to get team count ? CT/T
Reply With Quote #2

Didn't test but would be something like this.
PHP Code:
    int aliveCTCount;
    
int aliveTCount;
    
int lastTClient;
    
    for (
int client 1client <= MaxClientsclient++)
    {
        if (!
IsClientInGame(client))
            continue;
        
        if (
IsFakeClient(client))
            continue;
        
        if (!
IsPlayerAlive(client))
            continue;
        
        if (
GetClientTeam(client) == CS_TEAM_CT)
        {
            
aliveCTCount++;
        }
        else if (
GetClientTeam(client) == CS_TEAM_T)
        {
            
aliveTCount++;
            
lastTClient client;
        }
    }
    
    if (
aliveCTCount == && aliveTCount == 1)
    {
        
PerformBeacon(lastTClient//Your logic here
    

__________________

Last edited by Marttt; 08-09-2022 at 17:42.
Marttt is offline