diff --git a/Callouts/GangShootout.cs b/Callouts/GangShootout.cs index 1dabd5a..a3242b8 100644 --- a/Callouts/GangShootout.cs +++ b/Callouts/GangShootout.cs @@ -27,8 +27,8 @@ public class GangShootout : Callout private static bool _hasBegunAttacking; // Arrays - private static Ped[] _grovePeds = { GrovePed1, GrovePed2, GrovePed3 }; - private static Ped[] _ballasPeds = { BallasPed1, BallasPed2, BallasPed3 }; + private static Ped[] _grovePeds = new Ped[3]; + private static Ped[] _ballasPeds = new Ped[3]; public override bool OnBeforeCalloutDisplayed() { @@ -177,4 +177,4 @@ public override void End() // Functions.PlayScannerAudio("ATTENTION_THIS_IS_DISPATCH_HIGH WE_ARE_CODE FOUR NO_FURTHER_UNITS_REQUIRED"); base.End(); } -} \ No newline at end of file +} diff --git a/Callouts/HostageSituationReported.cs b/Callouts/HostageSituationReported.cs index 7640c2f..70cdd9c 100644 --- a/Callouts/HostageSituationReported.cs +++ b/Callouts/HostageSituationReported.cs @@ -20,14 +20,7 @@ public class HostageSituationReported : Callout private static bool _notificationDisplayed; private static RelationshipGroup _viRelationshipGroup = new("VI"); - - private static List _victimPeds = new() - { - null, - null, - null, - null - }; + private static List _victimPeds = new List(4); public override bool OnBeforeCalloutDisplayed() { @@ -175,4 +168,4 @@ public override void End() Functions.PlayScannerAudio("ATTENTION_THIS_IS_DISPATCH_HIGH ALL_UNITS_CODE4 NO_FURTHER_UNITS_REQUIRED"); base.End(); } -} \ No newline at end of file +} diff --git a/Callouts/MoneyTruckTheft.cs b/Callouts/MoneyTruckTheft.cs index 1f6a77e..be056ec 100644 --- a/Callouts/MoneyTruckTheft.cs +++ b/Callouts/MoneyTruckTheft.cs @@ -17,7 +17,7 @@ public class MoneyTruckTheft : Callout private static LHandle _pursuit; private static bool _pursuitCreated; - private static Ped[] _aggressors = { Aggressor1, Aggressor2, Aggressor3, Aggressor4 }; + private static Ped[] _aggressors = new Ped[3]; public override bool OnBeforeCalloutDisplayed() { @@ -147,4 +147,4 @@ public override void End() Functions.PlayScannerAudio("ATTENTION_THIS_IS_DISPATCH_HIGH ALL_UNITS_CODE4 NO_FURTHER_UNITS_REQUIRED"); base.End(); } -} \ No newline at end of file +} diff --git a/Callouts/RobberyHL.cs b/Callouts/RobberyHL.cs index bfb1d40..756f1d6 100644 --- a/Callouts/RobberyHL.cs +++ b/Callouts/RobberyHL.cs @@ -37,27 +37,8 @@ public class RobberyHl : Callout private static readonly Vector3 Swat3Spawn = new(3633.925f, 3768.781f, 28.51571f); // Arrays - private static Ped[] _aggressorPeds = - { - A1, - A2, - A3, - A4, - A5, - A6, - A7 - }; - - private static Blip[] _aggressorBlips = - { - B1, - B2, - B3, - B4, - B5, - B6, - B7 - }; + private static Ped[] _aggressorPeds = new Ped[7]; + private static Blip[] _aggressorBlips = new Blip[7]; // private static Vector3 _joinSwatVector; // private static bool _joinSwat = false; @@ -233,4 +214,4 @@ public override void End() Functions.PlayScannerAudio("ATTENTION_THIS_IS_DISPATCH_HIGH ALL_UNITS_CODE4 NO_FURTHER_UNITS_REQUIRED"); base.End(); } -} \ No newline at end of file +} diff --git a/Callouts/WarrantForArrest.cs b/Callouts/WarrantForArrest.cs index cf98ab5..aeb91dd 100644 --- a/Callouts/WarrantForArrest.cs +++ b/Callouts/WarrantForArrest.cs @@ -14,7 +14,6 @@ public class WarrantForArrest : Callout private static int _callOutMessage; private static bool _attack; private static bool _hasWeapon; - private static bool _wasClose; private static bool _alreadySubtitleIntrod; public override bool OnBeforeCalloutDisplayed() @@ -105,10 +104,9 @@ public override void OnCalloutNotAccepted() public override void Process() { - if (_subject.DistanceTo(MainPlayer) < 20f && !_wasClose) + if (_subject.DistanceTo(MainPlayer) < 20f) { Functions.PlayScannerAudio("ATTENTION_THIS_IS_DISPATCH_HIGH OFFICERS_ARRIVED_ON_SCENE"); - _wasClose = true; if (_attack && !_hasWeapon) { _subject.Inventory.GiveNewWeapon(new WeaponAsset(WepList[Rndm.Next(WepList.Length)]), 500, true); @@ -120,7 +118,6 @@ public override void Process() { Game.DisplaySubtitle("Press ~y~Y ~w~to speak with the person.", 5000); _alreadySubtitleIntrod = true; - _wasClose = true; } if (!_attack && Game.IsKeyDown(Settings.Dialog) && _subject.DistanceTo(MainPlayer) < 2f) @@ -202,4 +199,4 @@ public override void End() Functions.PlayScannerAudio("ATTENTION_THIS_IS_DISPATCH_HIGH ALL_UNITS_CODE4 NO_FURTHER_UNITS_REQUIRED"); base.End(); } -} \ No newline at end of file +}