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"); }
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"); }
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"); }