Esempio n. 1
0
        public Entity HeliSetup(Entity owner, float yaw)
        {
            Entity heli = Function.Call <Entity>("spawnHelicopter", owner, GetPathStart(owner.Origin, yaw), new Vector3(0, yaw, 0), "pavelow_mp", "vehicle_pavelow");

            VEHICLES.Add(heli);
            return(heli);
        }
Esempio n. 2
0
        public Entity HARRIER_SETUP(Entity self, Vector3 startPos, Vector3 forward)
        {
            Entity harrier = Function.Call <Entity>("SpawnHelicopter", self, startPos, forward, "harrier_mp", "vehicle_av8b_harrier_jet_opfor_mp");

            harrier.Call("SetHoverParams", 50, 100, 50);
            harrier.Call("SetTurningAbility", .05f);
            harrier.Call("SetYawSpeed", 250, 250, 250, .5f);
            harrier.Call("SetSpeed", 250, 175);
            harrier.Call("SetMaxPitchRoll", 0, 0);
            VEHICLES.Add(harrier);
            return(harrier);
        }
Esempio n. 3
0
        public Entity COBRA_SETUP(Entity self, Vector3 startPos, Vector3 forward)
        {
            Entity cobra = Function.Call <Entity>("SpawnHelicopter", self, startPos, forward, "cobra_mp", "vehicle_mi24p_hind_mp");

            cobra.Call("SetMaxPitchRoll", 45, 85);
            cobra.Call("SetYawSpeed", 120, 80);
            cobra.Call("SetSpeed", 130, 125);

            VEHICLES.Add(cobra);

            return(cobra);
        }
Esempio n. 4
0
        public void DestroyCobra(Entity cobra, bool isExplosive)
        {
            if (isExplosive)
            {
                double rot             = new Random().Next(0, 360);
                Entity explosionEffect = Function.Call <Entity>("spawnFx", Function.Call <int>("loadfx", "explosions/tanker_explosion"), cobra.Origin, new Vector3(0, 0, 1), new Vector3((float)Math.Cos(rot), (float)Math.Sin(rot), 0));
                Function.Call("triggerFx", explosionEffect);
                Function.Call("playSoundAtPos", cobra.Origin, "exp_suitcase_bomb_main");
            }

            if (!cobra.HasField("dropped"))
            {
                cobra.SetField("dropped", 1);
                Notify("run_crate", cobra.GetField <Entity>("owner"), cobra.Origin, new Vector3(), "com_deploy_ballistic_vest_friend_world", "helicopter", false);
            }
            VEHICLES.Remove(cobra);
            cobra.SetField("delete", 1);
            cobra.Call("Delete");
        }
Esempio n. 5
0
        public void DestroyHarrier(Entity harrier, bool isExplosive)
        {
            if (isExplosive)
            {
                double rot             = new Random().Next(0, 360);
                Entity explosionEffect = Function.Call <Entity>("spawnFx", Function.Call <int>("loadfx", "explosions/tanker_explosion"), harrier.Origin, new Vector3(0, 0, 1), new Vector3((float)Math.Cos(rot), (float)Math.Sin(rot), 0));
                Function.Call("triggerFx", explosionEffect);
                Function.Call("playSoundAtPos", harrier.Origin, "exp_suitcase_bomb_main");
            }

            if (!harrier.HasField("dropped"))
            {
                harrier.SetField("dropped", 1);
                Notify("run_crate", harrier.GetField <Entity>("owner"), harrier.Origin, new Vector3(0, 0, 0), "com_plasticcase_friendly", "airdrop_assault", true);
            }

            VEHICLES.Remove(harrier);
            harrier.SetField("delete", 1);
            harrier.Call("Delete");
        }
Esempio n. 6
0
        public void DestroyPavelow(Entity heli, bool isExplosive)
        {
            if (isExplosive)
            {
                double rot             = new Random().Next(0, 360);
                Entity explosionEffect = Function.Call <Entity>("spawnFx", Function.Call <int>("loadfx", "explosions/tanker_explosion"), heli.Origin, new Vector3(0, 0, 1), new Vector3((float)Math.Cos(rot), (float)Math.Sin(rot), 0));
                Function.Call("triggerFx", explosionEffect);
                Function.Call("playSoundAtPos", heli.Origin, "exp_suitcase_bomb_main");
            }

            if (heli.GetField <Entity>("owner").IsPlayer)
            {
                Function.Call("RadiusDamage", heli.GetField <Entity>("owner").Origin, 10, 10000, 10000, heli.GetField <Entity>("owner"), "MOD_EXPLOSIVE", "stinger_mp");
                heli.GetField <Entity>("owner").Call("ThermalVisionFOFOverlayOff");
                heli.GetField <Entity>("owner").Call("ThermalVisionOff");
            }

            VEHICLES.Remove(heli);
            heli.SetField("delete", 1);
            heli.GetField <Entity>("turret").Call("Delete");
            heli.Call("Delete");
        }