View Single Post
wicho
Veteran Member
Join Date: Feb 2012
Location: GuateAmala
Old 10-15-2018 , 12:17   Re: The round does not end if death by entity
Reply With Quote #9

I can not test now, but could this work?

PHP Code:
public plugin_init() 
{
    
RegisterHam(Ham_Killed"info_target""fw_PlayerKilled_bazooka")
}

public 
fw_PlayerKilled_bazooka(victimattackershouldgib)
{                
    new 
name[32], players[32], ctalivesz_classname[32]
         
get_players(playersctalive"ae""CT")
     
    
entity_get_string(attackerEV_SZ_classnamesz_classnamecharsmax(sz_classname))
    
         if(
equal(sz_classname"rpgrocket") && is_valid_ent(attacker) && ctalive == 1
    {     
           
// Disabled the infinity round
           
RemoveBlockControl(RC_CheckWinConditionsg_pCheckWinHook)
           
           
// Force round to end
           
RoundEndForceControl(WINSTATUS_CT)
           
           
// Disabled friendly fire
           
set_pcvar_num(g_cvar_firefriend0)                    
         } 

wicho is offline