Hi, I made my own killstreak. It is similar to the Swarm-Killstreak in Black Ops 2. Sadly The UAVs aren't attacking the enemies, they only attack me and this shouldn't be. Hopefully someone can help me to find the error :P I think it has something to do with the "victim" and the "owner".

#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;

Swarm(victim)
{
PrecacheVehicle( "harrier_mp" );
self endon("death");
self endon("disconnect");
self endon("senfbaum");
owner = self;
self iPrintlnBold("Wait for the UAV-Setup...");
swarm = spawnHelicopter(self, self.origin + (50, 0, 500), self.angles, "harrier_mp", "vehicle_uav_static_mp");
swarm2 = spawnHelicopter(self, self.origin + (50, 0, 500), self.angles, "harrier_mp", "vehicle_uav_static_mp");
swarm3 = spawnHelicopter(self, self.origin + (50, 0, 500), self.angles, "harrier_mp", "vehicle_uav_static_mp");
swarm4 = spawnHelicopter(self, self.origin + (50, 0, 500), self.angles, "harrier_mp", "vehicle_uav_static_mp");
//player = level.players[randomInt(level.players.size)];
foreach(player in level.players)
{
//if(player != owner)
//{
//wait 2;
player thread attacking(swarm, swarm2, swarm3, swarm4, owner, player);
//}
}
self thread end();
wait 0.3;
for(;
{
swarm Vehicle_SetSpeed(1000, 16);
swarm2 Vehicle_SetSpeed(1000, 16);
swarm3 Vehicle_SetSpeed(1000, 16);
swarm4 Vehicle_SetSpeed(1000, 16);
swarm setVehGoalPos(self.origin + (0, 0, 501), 1);
swarm2 setVehGoalPos(self.origin + (300, 0, 501), 1);
swarm3 setVehGoalPos(self.origin + (0, 300, 501), 1);
swarm4 setVehGoalPos(self.origin + (300, 300, 501), 1);
wait 0.05;
}
}

attacking(swarm, swarm2, swarm3, swarm4, owner, victim)
{
self endon("death");
self endon("disconnect");
self endon("senfbaum");
self iPrintlnBold("Press ^5F ^7to activate a ^3Hunter-UAV");
self notifyOnPlayerCommand("F", "+activate");
self waittill("F");
MagicBullet( "ac130_105mm_mp", swarm.origin+(0,0,-100), victim.origin , owner );
swarm delete();
self waittill("F");
MagicBullet( "ac130_105mm_mp", swarm2.origin+(0,0,-100), victim.origin , owner );
swarm2 delete();
self waittill("F");
MagicBullet( "ac130_105mm_mp", swarm3.origin+(0,0,-100), victim.origin , owner );
swarm3 delete();
self waittill("F");
MagicBullet( "ac130_105mm_mp", swarm4.origin+(0,0,-100), victim.origin , owner );
swarm4 delete();

}

end(swarm, swarm2, swarm3, swarm4)
{
self waittill("death");
self notify("senfbaum");
swarm delete();
swarm2 delete();
swarm3 delete();
swarm4 delete();
}