#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
init()
{
precacheShader("cardicon_thebomb");
//Custom scripts are processed before built-in so we need to wait
thread initType();
}
initType()
{
while(!isDefined(level.lowSpawn))
wait 0.2;
maps\mp\killstreaks\_airdrop::addCrateType("airdrop", "trap", 13/*Change this if you want to change the weight*/, ::TrapCrateThink);
maps\mp\killstreaks\_airdrop::addCrateType("airdrop_mega", "trap", 12/*Change this if you want to change the weight*/, ::TrapCrateThink);
//regenerate the max weighted value
//not needed if editing _airdrop.gsc
foreach (dropType, crateTypes in level.crateTypes)
{
level.crateMaxVal[dropType] = 0;
foreach ( crateType, crateWeight in level.crateTypes[dropType] )
{
if ( !crateWeight )
continue;
level.crateMaxVal[dropType] += crateWeight;
level.crateTypes[dropType][crateType] = level.crateMaxVal[dropType];
}
}
}
TrapCrateThink(dropType)
{
self endon("death");
self.usedBy = [];
if(!isDefined(dropType))
dropType = "airdrop";
random = randomInt(12);
c = 0;
fakeType = "ammo";
foreach(crateType,crateWeight in level.crateTypes[dropType])
{
if(c==random)
{
fakeType = crateType;
break;
}
c++;
}
if(!isDefined(game["strings"][fakeType + "_hint"]))
fakeType = "ammo";
if (!level.teamBased)
{
maps\mp\killstreaks\_airdrop::crateSetupForUse(gam e["strings"][fakeType + "_hint"], "all", maps\mp\killstreaks\_killstreaks::getKillstreakCra teIcon(fakeType));
if(isDefined(self.owner))
{
self maps\mp\_entityheadIcons::setHeadIcon(self.owner, "cardicon_thebomb", (0,0,24), 10, 10);
self disablePlayerUse( self.owner );
}
}
else
{
maps\mp\killstreaks\_airdrop::crateSetupForUse(gam e["strings"][fakeType + "_hint"], "all", maps\mp\killstreaks\_killstreaks::getKillstreakCra teIcon(fakeType));
self maps\mp\killstreaks\_airdrop::setUsableByTeam(getO therTeam(self.team));
self maps\mp\_entityheadIcons::setHeadIcon(self.team, "cardicon_thebomb", (0,0,24), 10, 10);
}
self thread crateEnemyCaptureThink();
self waittill("captured", player);
self playsound("javelin_clu_lock");
wait 1;
playfx(level.chopper_fx["explode"]["death"]["cobra"], self.origin, (0,0,1));
self playSound("cobra_helicopter_crash");
if(isDefined(self.owner) && isPlayer(self.owner))
self RadiusDamage(self.origin, 500, 200, 50, self.owner, "MOD_EXPLOSIVE", "bomb_site_mp");
else
self RadiusDamage(self.origin, 500, 200, 50, undefined, "MOD_EXPLOSIVE", "bomb_site_mp");
self maps\mp\killstreaks\_airdrop::deleteCrate();
}
crateEnemyCaptureThink()
{
while(isDefined(self))
{
self waittill("trigger", player);
if(isDefined(self.owner) && player==self.owner)
continue;
useEnt = self maps\mp\killstreaks\_airdrop::createUseEnt();
result = useEnt maps\mp\killstreaks\_airdrop::useHoldThink(player) ;
if(isDefined(useEnt))
useEnt delete();
if(!result)
continue;
self notify("captured", player);
}
}
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
init()
{
precacheShader("cardicon_thebomb");
//Custom scripts are processed before built-in so we need to wait
thread initType();
}
initType()
{
while(!isDefined(level.lowSpawn))
wait 0.2;
maps\mp\killstreaks\_airdrop::addCrateType("airdrop", "trap", 13/*Change this if you want to change the weight*/, ::TrapCrateThink);
maps\mp\killstreaks\_airdrop::addCrateType("airdrop_mega", "trap", 12/*Change this if you want to change the weight*/, ::TrapCrateThink);
//regenerate the max weighted value
//not needed if editing _airdrop.gsc
foreach (dropType, crateTypes in level.crateTypes)
{
level.crateMaxVal[dropType] = 0;
foreach ( crateType, crateWeight in level.crateTypes[dropType] )
{
if ( !crateWeight )
continue;
level.crateMaxVal[dropType] += crateWeight;
level.crateTypes[dropType][crateType] = level.crateMaxVal[dropType];
}
}
}
TrapCrateThink(dropType)
{
self endon("death");
self.usedBy = [];
if(!isDefined(dropType))
dropType = "airdrop";
random = randomInt(12);
c = 0;
fakeType = "ammo";
foreach(crateType,crateWeight in level.crateTypes[dropType])
{
if(c==random)
{
fakeType = crateType;
break;
}
c++;
}
if(!isDefined(game["strings"][fakeType + "_hint"]))
fakeType = "ammo";
if (!level.teamBased)
{
maps\mp\killstreaks\_airdrop::crateSetupForUse(gam e["strings"][fakeType + "_hint"], "all", maps\mp\killstreaks\_killstreaks::getKillstreakCra teIcon(fakeType));
if(isDefined(self.owner))
{
self maps\mp\_entityheadIcons::setHeadIcon(self.owner, "cardicon_thebomb", (0,0,24), 10, 10);
self disablePlayerUse( self.owner );
}
}
else
{
maps\mp\killstreaks\_airdrop::crateSetupForUse(gam e["strings"][fakeType + "_hint"], "all", maps\mp\killstreaks\_killstreaks::getKillstreakCra teIcon(fakeType));
self maps\mp\killstreaks\_airdrop::setUsableByTeam(getO therTeam(self.team));
self maps\mp\_entityheadIcons::setHeadIcon(self.team, "cardicon_thebomb", (0,0,24), 10, 10);
}
self thread crateEnemyCaptureThink();
self waittill("captured", player);
self playsound("javelin_clu_lock");
wait 1;
playfx(level.chopper_fx["explode"]["death"]["cobra"], self.origin, (0,0,1));
self playSound("cobra_helicopter_crash");
if(isDefined(self.owner) && isPlayer(self.owner))
self RadiusDamage(self.origin, 500, 200, 50, self.owner, "MOD_EXPLOSIVE", "bomb_site_mp");
else
self RadiusDamage(self.origin, 500, 200, 50, undefined, "MOD_EXPLOSIVE", "bomb_site_mp");
self maps\mp\killstreaks\_airdrop::deleteCrate();
}
crateEnemyCaptureThink()
{
while(isDefined(self))
{
self waittill("trigger", player);
if(isDefined(self.owner) && player==self.owner)
continue;
useEnt = self maps\mp\killstreaks\_airdrop::createUseEnt();
result = useEnt maps\mp\killstreaks\_airdrop::useHoldThink(player) ;
if(isDefined(useEnt))
useEnt delete();
if(!result)
continue;
self notify("captured", player);
}
}
Copyright © 2026, NextGenUpdate.
All Rights Reserved.