View Single Post
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-15-2020 , 16:27   Re: Stock to detect when a team dies
Reply With Quote #6

No, this should do it:
PHP Code:
public HamKilled_Post(iPlayer)
{
    new 
iPlayers[32], iNumCsTeams:csPlayerTeam
    
    csPlayerTeam 
cs_get_user_team(iPlayer)
    
get_players(iPlayersiNum"ae" ,(csPlayerTeam == CS_TEAM_T) ? "TERRORIST" "CT")
    
    if (!
iNum)
    {
        
AllPlayersDead(csPlayerTeam)
    }
}


public 
AllPlayersDeadCsTeams:csDeadTeam )
{
    
//All players on csDeadTeam are dead
    
if(!g_GameAvailable || !g_GameStart || g_GameEnd)
        return;
    
    if ( !
pev_validcsDeadTeam == CS_TEAM_T g_TerroristBase g_CTBase ) )
    {
        
Game_Ending5.0 csDeadTeam == CS_TEAM_CT CS_TEAM_T CS_TEAM_CT );
    }

__________________

Last edited by Bugsy; 05-15-2020 at 16:28.
Bugsy is offline