From 2d2ace602e432b1070a7d690d8d60b2dfb9b7a8e Mon Sep 17 00:00:00 2001 From: Charlie686 <93053975+Charlie-686@users.noreply.github.com> Date: Fri, 16 Aug 2024 15:37:19 +0100 Subject: [PATCH 1/5] Update HostageSituationReported.cs --- Callouts/HostageSituationReported.cs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) 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 +} From 2460fb1f29ac8b1647ff602e7f1393b6978ed38a Mon Sep 17 00:00:00 2001 From: Charlie686 <93053975+Charlie-686@users.noreply.github.com> Date: Fri, 16 Aug 2024 15:37:48 +0100 Subject: [PATCH 2/5] Update GangShootout.cs --- Callouts/GangShootout.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 +} From 209d5e57da569c86be9106d0dfe6f0ee97c68b2b Mon Sep 17 00:00:00 2001 From: Charlie686 <93053975+Charlie-686@users.noreply.github.com> Date: Fri, 16 Aug 2024 15:38:08 +0100 Subject: [PATCH 3/5] Update MoneyTruckTheft.cs --- Callouts/MoneyTruckTheft.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 +} From a36112e5acba7f02863eeff9ee9586e28773a849 Mon Sep 17 00:00:00 2001 From: Charlie686 <93053975+Charlie-686@users.noreply.github.com> Date: Fri, 16 Aug 2024 15:38:48 +0100 Subject: [PATCH 4/5] Update RobberyHL.cs --- Callouts/RobberyHL.cs | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) 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 +} From e3da51f0f92ef258f4690579846beb38e5e1aaeb Mon Sep 17 00:00:00 2001 From: Charlie686 <93053975+Charlie-686@users.noreply.github.com> Date: Fri, 16 Aug 2024 15:51:02 +0100 Subject: [PATCH 5/5] Removed boolean that breaks callout logic. the _wasClose check prevents the Process() logic from continuing. --- Callouts/WarrantForArrest.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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 +}