// IW6 GSC SOURCE
// Generated by https://github.com/xensik/gsc-tool

givechallenge( var_0 )
{
    thread deathwatcher();
    var_1 = tablelookuprownum( "mp/intelChallenges.csv", 0, var_0 );
    self setclientomnvar( "ui_intel_active_index", var_1 );

    switch ( var_0 )
    {
        case "ch_intel_headshots":
            thread intelheadshotchallenge( var_0 );
            break;
        case "ch_intel_kills":
            thread intelkillschallenge( var_0 );
            break;
        case "ch_intel_knifekill":
            thread intelknifekillchallenge( var_0 );
            break;
        case "ch_intel_explosivekill":
            thread intelbombkillchallenge( var_0 );
            break;
        case "ch_intel_crouchkills":
            thread intelcrouchkillschallenge( var_0 );
            break;
        case "ch_intel_pronekills":
            thread intelpronekillschallenge( var_0 );
            break;
        case "ch_intel_backshots":
            thread intelbackkillschallenge( var_0 );
            break;
        case "ch_intel_jumpshot":
            thread inteljumpshotkillschallenge( var_0 );
            break;
        case "ch_intel_secondarykills":
            thread intelsecondarykillschallenge( var_0 );
            break;
        case "ch_intel_foundshot":
            thread intelfoundshotkillschallenge( var_0 );
            break;
        case "ch_intel_tbag":
            thread inteltbagchallenge( var_0 );
            break;
        default:
    }
}

giveteamchallenge( var_0, var_1 )
{
    switch ( var_0 )
    {
        case "ch_team_intel_melee":
            level thread intelteammelee( var_0, var_1 );
            break;
        case "ch_team_intel_headshot":
            level thread intelteamheadshot( var_0, var_1 );
            break;
        case "ch_team_intel_killstreak":
            level thread intelteamkillstreak( var_0, var_1 );
            break;
        case "ch_team_intel_equipment":
            level thread intelteamequipment( var_0, var_1 );
            break;
        default:
    }
}

intelteammelee( var_0, var_1 )
{
    level endon( "game_ended" );
    level endon( "giveTeamIntel" );
    level endon( "teamIntelFail" );
    level.nummeleekillsintel = 0;
    var_2 = level.intelchallengearray[var_0].challengetarget;
    var_3 = tablelookuprownum( "mp/intelChallenges.csv", 0, var_0 );
    level thread teamintelstarthud( var_0, var_1, var_3, var_2 );

    while ( level.nummeleekillsintel < var_2 )
    {
        level waittill( "enemy_death" );
        setteamintelprogress( var_2 - level.nummeleekillsintel );
    }

    teamintelendhud( var_0, var_1 );
    level thread intelteamreward( var_1 );
}

setteamintelprogress( var_0 )
{
    level.updateintelprogress = int( max( var_0, 0 ) );
    updateteamintelprogress( level.updateintelprogress );
}

updateteamintelprogress( var_0 )
{
    level.currentteamintelprogress = var_0;

    foreach ( var_2 in level.players )
        var_2 playerupdateteamintelprogress();
}

playerupdateteamintelprogress()
{
    self setclientomnvar( "ui_intel_progress_current", level.currentteamintelprogress );
}

playerupdateintelprogress( var_0 )
{
    self setclientomnvar( "ui_intel_progress_current", var_0 );
}

intelteamheadshot( var_0, var_1 )
{
    level endon( "game_ended" );
    level endon( "giveTeamIntel" );
    level endon( "teamIntelFail" );
    level.numheadshotsintel = 0;
    var_2 = level.intelchallengearray[var_0].challengetarget;
    var_3 = tablelookuprownum( "mp/intelChallenges.csv", 0, var_0 );
    level thread teamintelstarthud( var_0, var_1, var_3, var_2 );

    while ( level.numheadshotsintel < var_2 )
    {
        level waittill( "enemy_death" );
        setteamintelprogress( var_2 - level.numheadshotsintel );
    }

    teamintelendhud( var_0, var_1 );
    level thread intelteamreward( var_1 );
}

intelteamkillstreak( var_0, var_1 )
{
    level endon( "game_ended" );
    level endon( "giveTeamIntel" );
    level endon( "teamIntelFail" );
    level.numkillstreakkillsintel = 0;
    var_2 = level.intelchallengearray[var_0].challengetarget;
    var_3 = tablelookuprownum( "mp/intelChallenges.csv", 0, var_0 );
    level thread teamintelstarthud( var_0, var_1, var_3, var_2 );

    while ( level.numkillstreakkillsintel < var_2 )
    {
        level waittill( "enemy_death" );
        setteamintelprogress( var_2 - level.numkillstreakkillsintel );
    }

    teamintelendhud( var_0, var_1 );
    level thread intelteamreward( var_1 );
}

intelteamequipment( var_0, var_1 )
{
    level endon( "game_ended" );
    level endon( "giveTeamIntel" );
    level endon( "teamIntelFail" );
    level.numequipmentkillsintel = 0;
    var_2 = level.intelchallengearray[var_0].challengetarget;
    var_3 = tablelookuprownum( "mp/intelChallenges.csv", 0, var_0 );
    level thread teamintelstarthud( var_0, var_1, var_3, var_2 );

    while ( level.numequipmentkillsintel < var_2 )
    {
        level waittill( "enemy_death" );
        setteamintelprogress( var_2 - level.numequipmentkillsintel );
    }

    teamintelendhud( var_0, var_1 );
    level thread intelteamreward( var_1 );
}

teamintelstarthud( var_0, var_1, var_2, var_3 )
{
    level endon( "game_ended" );
    level endon( "giveTeamIntel" );
    level endon( "teamIntelFail" );
    level endon( "teamIntelComplete" );
    level.isteamintelcomplete = 0;
    level.currentteamintelname = var_0;
    level.currentteamintelprogress = var_3;

    foreach ( var_5 in level.players )
        var_5 playerteamintelstarthud( var_0, var_1, var_2, var_3 );

    for (;;)
    {
        level waittill( "player_spawned", var_5 );
        var_5 playerteamintelstarthud( var_0, var_1, var_2, var_3 );
    }
}

playerteamintelstarthud( var_0, var_1, var_2, var_3 )
{
    if ( self.team != var_1 )
        return;

    self setclientomnvar( "ui_intel_active_index", var_2 );
    playerupdateteamintelprogress();

    if ( maps\mp\_utility::isreallyalive( self ) )
        thread maps\mp\gametypes\_hud_message::splashnotify( var_0 + "_received" );
}

teamintelendhud( var_0, var_1 )
{
    level notify( "teamIntelComplete" );

    foreach ( var_3 in level.players )
    {
        if ( var_3.team != var_1 )
            continue;

        var_3 setclientomnvar( "ui_intel_active_index", -1 );
        var_3 setclientomnvar( "ui_intel_progress_current", -1 );

        if ( maps\mp\_utility::isreallyalive( var_3 ) )
            var_3 thread maps\mp\gametypes\_hud_message::splashnotify( var_0 );
    }
}

intelteamreward( var_0 )
{
    level endon( "game_ended" );
    level notify( "intelTeamReward" );

    foreach ( var_2 in level.players )
    {
        if ( var_2.team != var_0 )
            continue;

        if ( !maps\mp\_utility::isreallyalive( var_2 ) )
            continue;

        var_2 thread intelteamrewardplayer();
    }

    level.isteamintelcomplete = 1;
}

intelteamrewardplayerwaittillcomplete( var_0 )
{
    level endon( "intelTeamReward" );

    while ( var_0 )
    {
        wait 1.0;
        maps\mp\gametypes\_hostmigration::waittillhostmigrationdone();

        if ( ( !isdefined( self.iscarrying ) || self.iscarrying == 0 ) && !isdefined( self.ui_securing ) )
            var_0 = max( 0, var_0 - 1.0 );

        if ( var_0 == 8 )
            childthread flashintelicon();
    }
}

intelteamrewardplayer()
{
    level endon( "game_ended" );
    var_0 = self;
    var_0 maps\mp\_utility::giveperk( "specialty_explosivebullets", 0 );
    var_0 setclientomnvar( "ui_horde_update_explosive", 1 );
    var_0 maps\mp\_utility::_giveweapon( level.intelminigun );
    var_0 givestartammo( level.intelminigun );

    if ( var_0 common_scripts\utility::isweaponenabled() && var_0 common_scripts\utility::isusabilityenabled() && !var_0 maps\mp\_utility::isusingremote() && !var_0 maps\mp\killstreaks\_killstreaks::isusinghelisniper() )
        var_0 switchtoweaponimmediate( level.intelminigun );

    var_0 intelteamrewardplayerwaittillcomplete( 60 );
    var_0 maps\mp\_utility::_unsetperk( "specialty_explosivebullets" );
    var_0 setclientomnvar( "ui_horde_update_explosive", 0 );
    var_1 = var_0 getcurrentprimaryweapon();
    var_0 takeweapon( level.intelminigun );

    if ( var_1 == level.intelminigun )
    {
        var_2 = var_0 maps\mp\killstreaks\_killstreaks::getfirstprimaryweapon();
        var_0 switchtoweaponimmediate( var_2 );
    }
}

flashintelicon()
{
    self endon( "death" );
    self endon( "disconnect" );
    self setclientomnvar( "ui_horde_update_explosive", 1 );
    wait 8;
    self setclientomnvar( "ui_horde_update_explosive", 0 );
}

intelsplash()
{

}

deathwatcher()
{
    self endon( "disconnect" );
    self endon( "intel_cleanup" );
    self waittill( "death" );
    self setclientomnvar( "ui_intel_active_index", -1 );
    thread maps\mp\gametypes\_hud_message::splashnotifydelayed( "ch_intel_failed" );
}

intelheadshotchallenge( var_0 )
{
    self endon( "disconnect" );
    self endon( "death" );
    self endon( "intel_cleanup" );
    var_1 = 0;
    var_2 = level.intelchallengearray[var_0].challengetarget;
    thread maps\mp\gametypes\_hud_message::splashnotifydelayed( var_0 + "_received", var_2 );
    playerupdateintelprogress( var_2 );

    while ( var_1 < var_2 )
    {
        self waittill( "got_a_kill", var_3, var_4, var_5 );

        if ( maps\mp\_utility::iskillstreakweapon( var_4 ) )
            continue;

        if ( var_5 == "MOD_HEAD_SHOT" )
        {
            var_1++;
            var_6 = var_2 - var_1;
            playerupdateintelprogress( var_6 );
        }
    }

    maps\mp\gametypes\_intel::awardplayerchallengecomplete( var_0 );
}

intelkillschallenge( var_0 )
{
    self endon( "disconnect" );
    self endon( "death" );
    self endon( "intel_cleanup" );
    var_1 = 0;
    var_2 = level.intelchallengearray[var_0].challengetarget;
    thread maps\mp\gametypes\_hud_message::splashnotifydelayed( var_0 + "_received", var_2 );
    playerupdateintelprogress( var_2 );

    while ( var_1 < var_2 )
    {
        self waittill( "got_a_kill", var_3, var_4 );

        if ( maps\mp\_utility::iskillstreakweapon( var_4 ) )
            continue;

        var_1++;
        var_5 = var_2 - var_1;
        playerupdateintelprogress( var_5 );
    }

    maps\mp\gametypes\_intel::awardplayerchallengecomplete( var_0 );
}

intelcrouchkillschallenge( var_0 )
{
    self endon( "disconnect" );
    self endon( "death" );
    self endon( "intel_cleanup" );
    var_1 = 0;
    var_2 = level.intelchallengearray[var_0].challengetarget;
    playerupdateintelprogress( var_2 );
    thread maps\mp\gametypes\_hud_message::splashnotifydelayed( var_0 + "_received", var_2 );

    while ( var_1 < var_2 )
    {
        self waittill( "got_a_kill", var_3, var_4 );

        if ( self getstance() == "crouch" )
        {
            if ( maps\mp\_utility::iskillstreakweapon( var_4 ) )
                continue;

            var_1++;
            var_5 = var_2 - var_1;
            playerupdateintelprogress( var_5 );
        }
    }

    maps\mp\gametypes\_intel::awardplayerchallengecomplete( var_0 );
}

intelfoundshotkillschallenge( var_0 )
{
    self endon( "disconnect" );
    self endon( "death" );
    self endon( "intel_cleanup" );
    var_1 = 0;
    var_2 = level.intelchallengearray[var_0].challengetarget;
    thread maps\mp\gametypes\_hud_message::splashnotifydelayed( var_0 + "_received", var_2 );
    playerupdateintelprogress( var_2 );

    while ( var_1 < var_2 )
    {
        self waittill( "got_a_kill", var_3, var_4, var_5 );

        if ( var_5 == "MOD_MELEE" && !maps\mp\gametypes\_weapons::isknifeonly( var_4 ) && !maps\mp\gametypes\_weapons::isriotshield( var_4 ) )
            continue;

        if ( maps\mp\gametypes\_weapons::isoffhandweapon( var_4 ) || maps\mp\_utility::iskillstreakweapon( var_4 ) || maps\mp\_utility::isenvironmentweapon( var_4 ) )
            continue;

        var_4 = maps\mp\_utility::weaponmap( var_4 );

        if ( var_4 != self.pers["primaryWeapon"] && var_4 != self.pers["secondaryWeapon"] )
        {
            var_1++;
            var_6 = var_2 - var_1;
            playerupdateintelprogress( var_6 );
        }
    }

    maps\mp\gametypes\_intel::awardplayerchallengecomplete( var_0 );
}

intelsecondarykillschallenge( var_0 )
{
    self endon( "disconnect" );
    self endon( "death" );
    self endon( "intel_cleanup" );
    var_1 = 0;
    var_2 = level.intelchallengearray[var_0].challengetarget;
    thread maps\mp\gametypes\_hud_message::splashnotifydelayed( var_0 + "_received", var_2 );
    playerupdateintelprogress( var_2 );

    while ( var_1 < var_2 )
    {
        self waittill( "got_a_kill", var_3, var_4, var_5 );
        var_4 = maps\mp\_utility::weaponmap( var_4 );

        if ( maps\mp\_utility::iscacsecondaryweapon( var_4 ) )
        {
            if ( var_5 == "MOD_MELEE" && !issubstr( var_4, "tactical" ) )
                continue;

            var_1++;
            var_6 = var_2 - var_1;
            playerupdateintelprogress( var_6 );
        }
    }

    maps\mp\gametypes\_intel::awardplayerchallengecomplete( var_0 );
}

intelbackkillschallenge( var_0 )
{
    self endon( "disconnect" );
    self endon( "death" );
    self endon( "intel_cleanup" );
    var_1 = 0;
    var_2 = level.intelchallengearray[var_0].challengetarget;
    thread maps\mp\gametypes\_hud_message::splashnotifydelayed( var_0 + "_received", var_2 );
    playerupdateintelprogress( var_2 );

    while ( var_1 < var_2 )
    {
        self waittill( "got_a_kill", var_3, var_4, var_5 );

        if ( maps\mp\_utility::iskillstreakweapon( var_4 ) )
            continue;

        var_6 = var_3.anglesondeath[1];
        var_7 = self.anglesonkill[1];
        var_8 = angleclamp180( var_6 - var_7 );

        if ( abs( var_8 ) < 65 )
        {
            var_1++;
            var_9 = var_2 - var_1;
            playerupdateintelprogress( var_9 );
        }
    }

    maps\mp\gametypes\_intel::awardplayerchallengecomplete( var_0 );
}

inteljumpshotkillschallenge( var_0 )
{
    self endon( "disconnect" );
    self endon( "death" );
    self endon( "intel_cleanup" );
    var_1 = 0;
    var_2 = int( level.intelchallengearray[var_0].challengetarget );
    thread maps\mp\gametypes\_hud_message::splashnotifydelayed( var_0 + "_received", var_2 );
    playerupdateintelprogress( var_2 );

    while ( var_1 < var_2 )
    {
        self waittill( "got_a_kill", var_3, var_4, var_5 );

        if ( maps\mp\_utility::iskillstreakweapon( var_4 ) )
            continue;

        if ( !self isonground() )
        {
            var_1++;
            var_6 = var_2 - var_1;
            playerupdateintelprogress( var_6 );
        }
    }

    maps\mp\gametypes\_intel::awardplayerchallengecomplete( var_0 );
}

intelknifekillchallenge( var_0 )
{
    self endon( "disconnect" );
    self endon( "death" );
    self endon( "intel_cleanup" );
    var_1 = 0;
    var_2 = level.intelchallengearray[var_0].challengetarget;
    thread maps\mp\gametypes\_hud_message::splashnotifydelayed( var_0 + "_received", var_2 );
    playerupdateintelprogress( var_2 );

    while ( var_1 < var_2 )
    {
        self waittill( "got_a_kill", var_3, var_4, var_5 );

        if ( var_5 == "MOD_MELEE" )
        {
            var_1++;
            var_6 = var_2 - var_1;
            playerupdateintelprogress( var_6 );
        }
    }

    maps\mp\gametypes\_intel::awardplayerchallengecomplete( var_0 );
}

intelbombkillchallenge( var_0 )
{
    self endon( "disconnect" );
    self endon( "death" );
    self endon( "intel_cleanup" );
    var_1 = 0;
    var_2 = level.intelchallengearray[var_0].challengetarget;
    thread maps\mp\gametypes\_hud_message::splashnotifydelayed( var_0 + "_received", var_2 );
    playerupdateintelprogress( var_2 );

    while ( var_1 < var_2 )
    {
        self waittill( "got_a_kill", var_3, var_4, var_5 );

        if ( maps\mp\_utility::iskillstreakweapon( var_4 ) )
            continue;

        if ( var_4 == "throwingknife_mp" )
            continue;

        if ( isexplosivedamagemod( var_5 ) || var_5 == "MOD_IMPACT" )
        {
            var_1++;
            var_6 = var_2 - var_1;
            playerupdateintelprogress( var_6 );
        }
    }

    maps\mp\gametypes\_intel::awardplayerchallengecomplete( var_0 );
}

intelpronekillschallenge( var_0 )
{
    self endon( "disconnect" );
    self endon( "death" );
    self endon( "intel_cleanup" );
    var_1 = 0;
    var_2 = int( level.intelchallengearray[var_0].challengetarget );
    thread maps\mp\gametypes\_hud_message::splashnotifydelayed( var_0 + "_received", var_2 );
    playerupdateintelprogress( var_2 );

    while ( var_1 < var_2 )
    {
        self waittill( "got_a_kill", var_3, var_4, var_5 );

        if ( maps\mp\_utility::iskillstreakweapon( var_4 ) )
            continue;

        if ( self getstance() == "prone" )
        {
            var_1++;
            var_6 = var_2 - var_1;
            playerupdateintelprogress( var_6 );
        }
    }

    maps\mp\gametypes\_intel::awardplayerchallengecomplete( var_0 );
}

inteltbagchallenge( var_0 )
{
    self endon( "disconnect" );
    self endon( "death" );
    self endon( "intel_cleanup" );
    var_1 = level.intelchallengearray[var_0].challengetarget;
    thread maps\mp\gametypes\_hud_message::splashnotifydelayed( var_0 + "_received" );

    for (;;)
    {
        self waittill( "got_a_kill", var_2, var_3, var_4 );

        if ( maps\mp\_utility::iskillstreakweapon( var_3 ) )
            continue;

        thread watchfortbag( var_2.origin, var_0 );
    }
}

watchfortbag( var_0, var_1 )
{
    self notify( "watchForTbag" );
    self endon( "watchForTbag" );
    self endon( "death" );
    self endon( "disconnect" );
    self endon( "intel_cleanup" );
    var_2 = 0;
    self notifyonplayercommand( "Tbag_adjustedStance", "+stance" );
    self notifyonplayercommand( "Tbag_adjustedStance", "+goStand" );

    if ( !level.console && !isai( self ) )
    {
        self notifyonplayercommand( "Tbag_adjustedStance", "+togglecrouch" );
        self notifyonplayercommand( "Tbag_adjustedStance", "+movedown" );
    }

    for (;;)
    {
        while ( self getstance() != "stand" )
            wait 0.05;

        self waittill( "Tbag_adjustedStance" );

        while ( self getstance() != "crouch" )
            wait 0.05;

        if ( distance2d( self.origin, var_0 ) < 128 )
        {
            self waittill( "Tbag_adjustedStance" );

            while ( self getstance() != "stand" )
                wait 0.05;

            if ( distance2d( self.origin, var_0 ) < 128 )
                var_2++;
        }

        if ( var_2 )
        {
            thread maps\mp\gametypes\_intel::awardplayerchallengecomplete( var_1 );
            return;
        }
    }
}

givejuggernautchallenge( var_0 )
{
    thread deathwatcher();
    var_1 = tablelookuprownum( "mp/intelChallenges.csv", 0, var_0 );
    self setclientomnvar( "ui_intel_active_index", var_1 );

    switch ( var_0 )
    {
        case "ch_intel_jugg_maniac_knife":
            thread inteljuggmaniacknifechallenge( var_0 );
            break;
        case "ch_intel_jugg_maniac_throwingknife":
            thread inteljuggmaniacthrowingknifechallenge( var_0 );
            break;
        case "ch_intel_jugg_maniac_backknife":
            thread inteljuggmaniacbackknifechallenge( var_0 );
            break;
        case "ch_intel_jugg_assault_kills":
            thread inteljuggassaultkillschallenge( var_0 );
            break;
        case "ch_intel_jugg_recon_shieldkills":
            thread inteljuggreconshieldkillschallenge( var_0 );
            break;
        case "ch_intel_jugg_recon_pistolkills":
            thread inteljuggreconpistolkillschallenge( var_0 );
            break;
        default:
    }
}

inteljuggassaultkillschallenge( var_0 )
{
    self endon( "disconnect" );
    self endon( "death" );
    self endon( "intel_cleanup" );
    var_1 = 0;
    var_2 = int( level.intelchallengearray[var_0].challengetarget );
    thread maps\mp\gametypes\_hud_message::splashnotifydelayed( var_0 + "_received", var_2 );
    playerupdateintelprogress( var_2 );

    while ( var_1 < var_2 )
    {
        self waittill( "got_a_kill", var_3, var_4, var_5 );

        if ( maps\mp\_utility::isjuggernautweapon( var_4 ) )
        {
            var_1++;
            var_6 = var_2 - var_1;
            playerupdateintelprogress( var_6 );
        }
    }

    maps\mp\gametypes\_intel::awardplayerchallengecomplete( var_0 );
}

inteljuggmaniacknifechallenge( var_0 )
{
    self endon( "disconnect" );
    self endon( "death" );
    self endon( "intel_cleanup" );
    var_1 = 0;
    var_2 = int( level.intelchallengearray[var_0].challengetarget );
    thread maps\mp\gametypes\_hud_message::splashnotifydelayed( var_0 + "_received", var_2 );
    playerupdateintelprogress( var_2 );

    while ( var_1 < var_2 )
    {
        self waittill( "got_a_kill", var_3, var_4, var_5 );

        if ( var_4 == "iw6_knifeonlyjugg_mp" )
        {
            var_1++;
            var_6 = var_2 - var_1;
            playerupdateintelprogress( var_6 );
        }
    }

    maps\mp\gametypes\_intel::awardplayerchallengecomplete( var_0 );
}

inteljuggmaniacthrowingknifechallenge( var_0 )
{
    self endon( "disconnect" );
    self endon( "death" );
    self endon( "intel_cleanup" );
    var_1 = 0;
    var_2 = int( level.intelchallengearray[var_0].challengetarget );
    thread maps\mp\gametypes\_hud_message::splashnotifydelayed( var_0 + "_received", var_2 );
    playerupdateintelprogress( var_2 );

    while ( var_1 < var_2 )
    {
        self waittill( "got_a_kill", var_3, var_4, var_5 );

        if ( var_4 == "throwingknifejugg_mp" )
        {
            var_1++;
            var_6 = var_2 - var_1;
            playerupdateintelprogress( var_6 );
        }
    }

    maps\mp\gametypes\_intel::awardplayerchallengecomplete( var_0 );
}

inteljuggmaniacbackknifechallenge( var_0 )
{
    self endon( "disconnect" );
    self endon( "death" );
    self endon( "intel_cleanup" );
    var_1 = 0;
    var_2 = level.intelchallengearray[var_0].challengetarget;
    thread maps\mp\gametypes\_hud_message::splashnotifydelayed( var_0 + "_received", var_2 );
    playerupdateintelprogress( var_2 );

    while ( var_1 < var_2 )
    {
        self waittill( "got_a_kill", var_3, var_4, var_5 );

        if ( maps\mp\_utility::isjuggernautweapon( var_4 ) )
        {
            var_6 = var_3.anglesondeath[1];
            var_7 = self.anglesonkill[1];
            var_8 = angleclamp180( var_6 - var_7 );

            if ( abs( var_8 ) < 90 )
            {
                var_1++;
                var_9 = var_2 - var_1;
                playerupdateintelprogress( var_9 );
            }
        }
    }

    maps\mp\gametypes\_intel::awardplayerchallengecomplete( var_0 );
}

inteljuggreconshieldkillschallenge( var_0 )
{
    self endon( "disconnect" );
    self endon( "death" );
    self endon( "intel_cleanup" );
    var_1 = 0;
    var_2 = int( level.intelchallengearray[var_0].challengetarget );
    thread maps\mp\gametypes\_hud_message::splashnotifydelayed( var_0 + "_received", var_2 );
    playerupdateintelprogress( var_2 );

    while ( var_1 < var_2 )
    {
        self waittill( "got_a_kill", var_3, var_4, var_5 );

        if ( var_4 == "iw6_riotshieldjugg_mp" )
        {
            var_1++;
            var_6 = var_2 - var_1;
            playerupdateintelprogress( var_6 );
        }
    }

    maps\mp\gametypes\_intel::awardplayerchallengecomplete( var_0 );
}

inteljuggreconpistolkillschallenge( var_0 )
{
    self endon( "disconnect" );
    self endon( "death" );
    self endon( "intel_cleanup" );
    var_1 = 0;
    var_2 = int( level.intelchallengearray[var_0].challengetarget );
    thread maps\mp\gametypes\_hud_message::splashnotifydelayed( var_0 + "_received", var_2 );
    playerupdateintelprogress( var_2 );

    while ( var_1 < var_2 )
    {
        self waittill( "got_a_kill", var_3, var_4, var_5 );

        if ( var_4 == "iw6_magnumjugg_mp" && var_5 != "MOD_MELEE" )
        {
            var_1++;
            var_6 = var_2 - var_1;
            playerupdateintelprogress( var_6 );
        }
    }

    maps\mp\gametypes\_intel::awardplayerchallengecomplete( var_0 );
}
