public override void Process() { GameFiber.StartNew(delegate { if (_A1.DistanceTo(Game.LocalPlayer.Character) < 25f) { if (_Scene1 == true && !_hasBegunAttacking) { _A1.Tasks.FightAgainstClosestHatedTarget(1000f); _A2.Tasks.FightAgainstClosestHatedTarget(1000f); _A1.Tasks.FightAgainst(Game.LocalPlayer.Character); _A2.Tasks.FightAgainst(Game.LocalPlayer.Character); GameFiber.Wait(2000); _hasBegunAttacking = true; } else if (_Scene2 == true && !_notificationDisplayed && !_check) { _A1.Tasks.FightAgainstClosestHatedTarget(1000f); _A2.Tasks.FightAgainstClosestHatedTarget(1000f); _A1.Tasks.FightAgainst(Game.LocalPlayer.Character); _A2.Tasks.FightAgainst(Game.LocalPlayer.Character); GameFiber.Wait(2000); _hasBegunAttacking = true; } else if (_Scene3 == true && !_pursuitCreated) { _pursuit = Functions.CreatePursuit(); Functions.AddPedToPursuit(_pursuit, _A1); Functions.AddPedToPursuit(_pursuit, _A2); Functions.SetPursuitIsActiveForPlayer(_pursuit, true); _pursuitCreated = true; } } if (_A1 && _A1.IsDead && _A2 && _A2.IsDead) { End(); } if (_A1 && Functions.IsPedArrested(_A1) && _A2 && Functions.IsPedArrested(_A2)) { End(); } if (Game.LocalPlayer.Character.IsDead) { End(); } if (Game.IsKeyDown(Settings.EndCall)) { End(); } }, "Store Robbery [UnitedCallouts]"); base.Process(); }
public override void Process() { GameFiber.StartNew(delegate { if (_Aggressor && _Aggressor.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) < 20f && !_hasBegunAttacking) { if (_scenario > 40) { new RelationshipGroup("AG"); new RelationshipGroup("VI"); _Aggressor.RelationshipGroup = "AG"; Game.LocalPlayer.Character.RelationshipGroup = "VI"; Game.SetRelationshipBetweenRelationshipGroups("AG", "VI", Relationship.Hate); _Aggressor.Tasks.FightAgainstClosestHatedTarget(1000f); GameFiber.Wait(200); _Aggressor.Tasks.FightAgainst(Game.LocalPlayer.Character); _hasBegunAttacking = true; GameFiber.Wait(600); } else { if (!_hasPursuitBegun) { _pursuit = Functions.CreatePursuit(); Functions.AddPedToPursuit(_pursuit, _Aggressor); Functions.SetPursuitIsActiveForPlayer(_pursuit, true); _pursuitCreated = true; _hasPursuitBegun = true; } } } if (_Aggressor && _Aggressor.IsDead) { End(); } if (Functions.IsPedArrested(_Aggressor)) { End(); } if (Game.LocalPlayer.Character.IsDead) { End(); } if (Game.IsKeyDown(Settings.EndCall)) { End(); } }, "ATMActivity [UnitedCallouts]"); base.Process(); }
public override void Process() { base.Process(); GameFiber.StartNew(delegate { if (suspect.Exists() && suspect.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) < 40f) { suspect.KeepTasks = true; if (locationBlip.Exists()) { locationBlip.Delete(); } if (suspectVehicle.Exists()) { suspectVehicle.Explode(true); // !!! EntityFire currently only works for class Ped //NativeFunction.Natives.StartEntityFire(suspectVehicle); //NativeFunction.CallByName<uint>("START_ENTITY_FIRE", suspectVehicle); } GameFiber.Wait(2000); } if (Game.LocalPlayer.Character.IsDead) { End(); } if (Game.IsKeyDown(Initialization.endKey)) { End(); } if (suspect.Exists()) { if (Functions.IsPedArrested(suspect)) { End(); } } }, "HeliCrash [FireyCallouts]"); }
public override void Process() { base.Process(); GameFiber.StartNew(delegate { if (suspect.Exists() && suspect.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) < 40f) { if (!notificationShown) { suspect.KeepTasks = true; Game.LogTrivial("[FireyCalouts][Debug-log] Truck burning: Pol mode notice"); Game.DisplayHelp("Press " + Initialization.dialogueKey.ToString() + " to show dialogues."); notificationShown = true; } else if (!notificationShown) { suspect.Tasks.PerformDrivingManeuver(suspectVehicle, VehicleManeuver.GoForwardStraightBraking, 100); Game.LogTrivial("[FireyCalouts][Debug-log] Truck burning: Fire mode notice 1"); notificationShown = true; } // Make the truck burn if (suspectVehicle.Exists() && !madeTruckSmoke) { suspectVehicle.EngineHealth = 0; Game.LogTrivial("[FireyCalouts][Debug-log] Truck burning: Now smoking"); GameFiber.Wait(5000); if (suspect.Exists() && !otherNotificationShown) { otherNotificationShown = true; Game.LogTrivial("[FireyCalouts][Debug-log] Truck burning: Fire mode notice 2"); suspect.Tasks.LeaveVehicle(LeaveVehicleFlags.BailOut); } if (suspectVehicle.Exists()) { suspectVehicle.EngineHealth = 1; } GameFiber.Wait(15000); if (willExplode && suspectVehicle.Exists()) { suspectVehicle.Explode(true); willExplode = false; Game.LogTrivial("[FireyCalouts][Debug-log] Truck burning: Explode"); } madeTruckSmoke = true; } } if (!willExplode) { if (suspect.Exists() && !suspectDialogueComplete && suspect.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) < 11f && suspectVehicle.Velocity == Vector3.Zero) { if (Game.IsKeyDown(Initialization.dialogueKey)) { // Story Game.DisplaySubtitle(dialoguesSuspect[dialoguePoint][dialogueCount]); dialogueCount++; GameFiber.Wait(1000); if (dialogueCount == dialoguesSuspect[dialoguePoint].Length) { // Select ending if (selector == 1 && dialoguePoint == selector) { dialogueCount = 0; dialoguePoint = dialogueEndChoice; } else { suspectDialogueComplete = true; } // Create pursuit if none exists and storyline 4 is chosen if (suspectDialogueComplete && !pursuitCreated && dialogueEndChoice == 4) { pursuit = Functions.CreatePursuit(); Functions.AddPedToPursuit(pursuit, suspect); Functions.SetPursuitIsActiveForPlayer(pursuit, true); pursuitCreated = true; Game.LogTrivial("[FireyCalouts][Debug-log] Pursuit started"); } } } } } if (Game.LocalPlayer.Character.IsDead) { End(); } if (Game.IsKeyDown(Initialization.endKey)) { End(); } if (suspect.Exists()) { if (suspect.IsDead) { End(); } } if (suspect.Exists()) { if (Functions.IsPedArrested(suspect)) { End(); } } }, "BurningTruck [FireyCallouts]"); }
public override void Process() { GameFiber.StartNew(delegate { if (_Seller.DistanceTo(Game.LocalPlayer.Character) < 20f) { if (_attack == true && _startedPursuit == false) { _pursuit = Functions.CreatePursuit(); Functions.AddPedToPursuit(_pursuit, _Seller); Functions.AddPedToPursuit(_pursuit, _Buyer); Functions.SetPursuitIsActiveForPlayer(_pursuit, true); _startedPursuit = true; } if (_Seller.DistanceTo(Game.LocalPlayer.Character) < 15f && Game.LocalPlayer.Character.IsOnFoot && _alreadySubtitleIntrod == false && _pursuit == null) { Game.DisplaySubtitle("Press ~y~Y ~w~to speak with the Seller", 5000); _Buyer.Face(_Car); _Seller.Face(Game.LocalPlayer.Character); _alreadySubtitleIntrod = true; _wasClose = true; } if (_attack == false && _Seller.DistanceTo(Game.LocalPlayer.Character) < 2f && Game.IsKeyDown(Settings.Dialog)) { _Seller.Face(Game.LocalPlayer.Character); switch (_storyLine) { case 1: Game.DisplaySubtitle("~y~Seller: ~w~Oh, hello Officer, I didn't hear you. How can I help?", 5000); _storyLine++; break; case 2: Game.DisplaySubtitle("~b~You: ~w~Are you the owner?", 5000); _storyLine++; break; case 3: Game.DisplaySubtitle("~y~Suspect: ~w~ah...yes I am the owner! Is anything wrong? ", 5000); _storyLine++; break; case 4: if (_callOutMessage == 1) { Game.DisplaySubtitle("~b~You: ~w~Why is there a police car?", 5000); } if (_callOutMessage == 2) { Game.DisplaySubtitle("~b~You: ~w~Who is the guy next to the police vehicle?", 5000); } if (_callOutMessage == 3) { Game.DisplaySubtitle("~b~You: ~w~If you are the owner, I'll need to arrest you.", 5000); } _storyLine++; break; case 5: if (_callOutMessage == 1) { Game.DisplaySubtitle("~y~Suspect: ~w~I don't know. I came in and the police car was here.", 5000); } Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~w~UnitedCallouts", "~y~Dispatch", "The plate of the ~b~" + _Car.Model.Name + "~w~ is ~o~" + _Car.LicensePlate + "~w~. The car was ~r~stolen~w~ from the police station in ~b~Mission Row~w~."); Game.DisplayHelp("~y~Arrest the owner and the buyer.", 5000); if (_callOutMessage == 2) { Game.DisplaySubtitle("~y~Suspect: ~w~Only a friend!", 5000); _Buyer.Inventory.GiveNewWeapon("WEAPON_PISTOL", 500, true); Rage.Native.NativeFunction.CallByName <uint>("TASK_COMBAT_PED", _Buyer, Game.LocalPlayer.Character, 0, 16); } if (_callOutMessage == 3) { Game.DisplaySubtitle("~y~Suspect: ~w~No, why?", 5000); _Seller.Inventory.GiveNewWeapon("WEAPON_KNIFE", 500, true); Rage.Native.NativeFunction.CallByName <uint>("TASK_COMBAT_PED", _Seller, Game.LocalPlayer.Character, 0, 16); Rage.Native.NativeFunction.CallByName <uint>("TASK_COMBAT_PED", _Buyer, Game.LocalPlayer.Character, 0, 16); } _storyLine++; break; default: break; } } } if (Game.LocalPlayer.Character.IsDead) { End(); } if (Game.IsKeyDown(Settings.EndCall)) { End(); } if (_Seller.IsDead && _Buyer.IsDead) { End(); } if (Functions.IsPedArrested(_Seller) && Functions.IsPedArrested(_Buyer)) { End(); } }, "CarTrade [UnitedCallouts]"); base.Process(); }
public override void Process() { GameFiber.StartNew(delegate { if (_subject.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) < 18f && !_isArmed) { _subject.Inventory.GiveNewWeapon("WEAPON_KNIFE", 500, true); _isArmed = true; } if (_subject && _subject.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) < 18f && !_hasBegunAttacking) { if (_scenario > 40) { _subject.KeepTasks = true; _subject.Tasks.FightAgainst(Game.LocalPlayer.Character); _hasBegunAttacking = true; switch (new Random().Next(1, 3)) { case 1: Game.DisplaySubtitle("~r~Suspect: ~w~I do not want to live anymore!", 4000); _hasSpoke = true; break; case 2: Game.DisplaySubtitle("~r~Suspect: ~w~Go away! - I'm not going back to the psychiatric hospital!", 4000); _hasSpoke = true; break; case 3: Game.DisplaySubtitle("~r~Suspect: ~w~I'm not going back to the psychiatric hospital!", 4000); _hasSpoke = true; break; default: break; } GameFiber.Wait(2000); } else { if (!_hasPursuitBegun) { _pursuit = Functions.CreatePursuit(); Functions.AddPedToPursuit(_pursuit, _subject); Functions.SetPursuitIsActiveForPlayer(_pursuit, true); _hasPursuitBegun = true; } } } if (Game.LocalPlayer.Character.IsDead) { End(); } if (Game.IsKeyDown(Settings.EndCall)) { End(); } if (_subject && _subject.IsDead) { End(); } if (_subject && Functions.IsPedArrested(_subject)) { End(); } }, "Person with Knife [UnitedCallouts]"); base.Process(); }
internal static void TestNearestPedForAlcohol() { if (!Game.LocalPlayer.Character.IsInAnyVehicle(false) && !TrafficPolicerHandler.PerformingImpairmentTest) { TrafficPolicerHandler.PerformingImpairmentTest = true; GameFiber.StartNew(delegate { Ped[] nearbypeds = Game.LocalPlayer.Character.GetNearbyPeds(1); if (nearbypeds.Length != 0) { Ped nearestPed = nearbypeds[0]; if (nearestPed.Exists()) { if (Vector3.Distance(nearestPed.Position, Game.LocalPlayer.Character.Position) < 2.5f && nearestPed.RelationshipGroup != "COP" && nearestPed.RelationshipGroup != "PLAYER" && nearestPed.IsHuman) { Game.LocalPlayer.Character.Inventory.GiveNewWeapon("WEAPON_UNARMED", 1, true); AddPedToDictionaries(nearestPed); AlcoholLevels PedAlcoholLevel = PedAlcoholLevels[nearestPed.Handle]; float Reading = DetermineAlcoholReading(nearestPed, PedAlcoholLevel); try { if (!nearestPed.IsInAnyVehicle(false)) { nearestPed.BlockPermanentEvents = true; nearestPed.IsPersistent = true; } Rage.Native.NativeFunction.Natives.SET_PED_STEALTH_MOVEMENT(Game.LocalPlayer.Character, 0, 0); Vector3 directionFromPedToNearest = (nearestPed.Position - Game.LocalPlayer.Character.Position); directionFromPedToNearest.Normalize(); if (!nearestPed.IsInAnyVehicle(false)) { nearestPed.Tasks.AchieveHeading(MathHelper.ConvertDirectionToHeading(directionFromPedToNearest) + 180f).WaitForCompletion(1500); } //Game.LocalPlayer.Character.Tasks.GoStraightToPosition(nearestPed.Position, MathHelper.ConvertDirectionToHeading(directionFromPedToNearest), 0.9f).WaitForCompletion(600); directionFromPedToNearest = (nearestPed.Position - Game.LocalPlayer.Character.Position); directionFromPedToNearest.Normalize(); Game.LocalPlayer.Character.Tasks.AchieveHeading(MathHelper.ConvertDirectionToHeading(directionFromPedToNearest)).WaitForCompletion(1600); if (nearestPed.IsInAnyVehicle(false)) { //Game.LocalPlayer.Character.Tasks.PlayAnimation("missfbi3_party_b", "walk_to_balcony_male2", 0.5f, AnimationFlags.None).WaitForCompletion(500); Game.LocalPlayer.Character.Tasks.PlayAnimation("amb@code_human_police_investigate@idle_b", "idle_e", 2f, 0); if (!nearestPed.CurrentVehicle.IsBike) { nearestPed.Tasks.PlayAnimation("amb@incar@male@smoking_low@idle_a", "idle_a", 2f, 0); } GameFiber.Sleep(2000); } else { nearestPed.Tasks.PlayAnimation("switch@michael@smoking", "michael_smoking_loop", 2f, AnimationFlags.SecondaryTask).WaitForCompletion(8000); Game.LocalPlayer.Character.Tasks.Clear(); } } catch (Exception e) { } finally { //GameFiber.Sleep(1800); //Game.LocalPlayer.Character.Tasks.ClearImmediately(); uint noti = Game.DisplayNotification("Waiting for ~b~breathalyzer~s~ result..."); if (TrafficPolicerHandler.IsLSPDFRPlusRunning) { API.LSPDFRPlusFunctions.AddCountToStatistic(Main.PluginName, "Breathalyzer tests conducted"); } GameFiber.Sleep(3000); Game.LocalPlayer.Character.Tasks.Clear(); Game.RemoveNotification(noti); if (Reading == -1) { Game.DisplayNotification("The person ~r~failed to provide ~s~ a valid breath sample."); } else { Game.DisplayNotification("~b~Alcohol Reading: " + DetermineColourCode(PedAlcoholLevel) + Reading.ToString("n" + CountDigitsAfterDecimal(AlcoholLimit)) + AlcoholLimitUnit + ".~n~~b~Limit: " + AlcoholLimit.ToString() + "" + AlcoholLimitUnit + "."); } TrafficPolicerHandler.PerformingImpairmentTest = false; if (nearestPed.Exists()) { if (!nearestPed.IsInAnyVehicle(false)) { if (nearestPed.LastVehicle.Exists()) { if (nearestPed.DistanceTo(nearestPed.LastVehicle) < 20f) { if (IsPedOverTheLimit(nearestPed) && !TrafficPolicerHandler.PedsToChargeWithDrinkDriving.Contains(nearestPed)) { TrafficPolicerHandler.PedsToChargeWithDrinkDriving.Add(nearestPed); if (TrafficPolicerHandler.IsLSPDFRPlusRunning) { API.LSPDFRPlusFunctions.AddCountToStatistic(Main.PluginName, "People caught driving over alcohol limit"); } } } } nearestPed.Tasks.StandStill(7000).WaitForCompletion(7000); if (nearestPed.Exists()) { if (!Functions.IsPedGettingArrested(nearestPed) && !Functions.IsPedArrested(nearestPed) && !Functions.IsPedStoppedByPlayer(nearestPed)) { nearestPed.Dismiss(); } } } else if (nearestPed.CurrentVehicle.Driver == nearestPed) { if (IsPedOverTheLimit(nearestPed) && !TrafficPolicerHandler.PedsToChargeWithDrinkDriving.Contains(nearestPed)) { TrafficPolicerHandler.PedsToChargeWithDrinkDriving.Add(nearestPed); if (TrafficPolicerHandler.IsLSPDFRPlusRunning) { API.LSPDFRPlusFunctions.AddCountToStatistic(Main.PluginName, "People caught driving over alcohol limit"); } } } } } } } } TrafficPolicerHandler.PerformingImpairmentTest = false; }); } }
internal static void testNearestPedForDrugs() { if (!Game.LocalPlayer.Character.IsInAnyVehicle(false)) { TrafficPolicerHandler.PerformingImpairmentTest = true; GameFiber.StartNew(delegate { Ped[] nearbypeds = Game.LocalPlayer.Character.GetNearbyPeds(1); if (nearbypeds.Length != 0) { Ped nearestPed = nearbypeds[0]; if (nearestPed.Exists()) { if (Vector3.Distance(nearestPed.Position, Game.LocalPlayer.Character.Position) < 2.5f && nearestPed.RelationshipGroup != "COP" && nearestPed.RelationshipGroup != "PLAYER" && nearestPed.IsHuman) { Game.LocalPlayer.Character.Inventory.GiveNewWeapon("WEAPON_UNARMED", 1, true); addPedToDictionaries(nearestPed); DrugsLevels CannabisLevel = pedCannabisLevels[nearestPed.Handle]; DrugsLevels CocaineLevel = pedCocaineLevels[nearestPed.Handle]; try { if (!nearestPed.IsInAnyVehicle(false)) { nearestPed.BlockPermanentEvents = true; nearestPed.IsPersistent = true; } Rage.Native.NativeFunction.Natives.SET_PED_STEALTH_MOVEMENT(Game.LocalPlayer.Character, 0, 0); Vector3 directionFromPedToNearest = (nearestPed.Position - Game.LocalPlayer.Character.Position); directionFromPedToNearest.Normalize(); if (!nearestPed.IsInAnyVehicle(false)) { nearestPed.Tasks.AchieveHeading(MathHelper.ConvertDirectionToHeading(directionFromPedToNearest) + 180f).WaitForCompletion(1500); } //Game.LocalPlayer.Character.Tasks.GoStraightToPosition(nearestPed.Position, MathHelper.ConvertDirectionToHeading(directionFromPedToNearest), 0.9f).WaitForCompletion(600); directionFromPedToNearest = (nearestPed.Position - Game.LocalPlayer.Character.Position); directionFromPedToNearest.Normalize(); Game.LocalPlayer.Character.Tasks.AchieveHeading(MathHelper.ConvertDirectionToHeading(directionFromPedToNearest)).WaitForCompletion(1600); if (nearestPed.IsInAnyVehicle(false)) { //Game.LocalPlayer.Character.Tasks.PlayAnimation("missfbi3_party_b", "walk_to_balcony_male2", 0.5f, AnimationFlags.None).WaitForCompletion(500); Game.LocalPlayer.Character.Tasks.PlayAnimation("amb@code_human_police_investigate@idle_b", "idle_e", 2f, 0); nearestPed.Tasks.PlayAnimation("amb@incar@male@smoking_low@idle_a", "idle_a", 2f, 0); GameFiber.Sleep(2000); } else { nearestPed.Tasks.PlayAnimation("switch@michael@smoking", "michael_smoking_loop", 2f, AnimationFlags.SecondaryTask).WaitForCompletion(8000); Game.LocalPlayer.Character.Tasks.Clear(); } } catch (Exception e) { } finally { //GameFiber.Sleep(1800); //Game.LocalPlayer.Character.Tasks.ClearImmediately(); uint noti = Game.DisplayNotification("Waiting for ~b~drugalyzer~s~ result..."); if (TrafficPolicerHandler.IsLSPDFRPlusRunning) { API.LSPDFRPlusFunctions.AddCountToStatistic(Main.PluginName, "Drugalyzer tests conducted"); } GameFiber.Sleep(4000); Game.LocalPlayer.Character.Tasks.Clear(); Game.RemoveNotification(noti); Game.DisplayNotification("~b~Cannabis: " + CannabisLevel.ToColouredString() + "~n~~b~Cocaine: " + CocaineLevel.ToColouredString()); TrafficPolicerHandler.PerformingImpairmentTest = false; if (nearestPed.Exists()) { if (!nearestPed.IsInAnyVehicle(false)) { if (nearestPed.LastVehicle.Exists()) { if (nearestPed.DistanceTo(nearestPed.LastVehicle) < 20f) { if (DoesPedHaveDrugsInSystem(nearestPed) && !TrafficPolicerHandler.PedsToChargeWithDrugDriving.Contains(nearestPed)) { TrafficPolicerHandler.PedsToChargeWithDrugDriving.Add(nearestPed); if (TrafficPolicerHandler.IsLSPDFRPlusRunning) { API.LSPDFRPlusFunctions.AddCountToStatistic(Main.PluginName, "People caught driving over drugs limit"); } } } } nearestPed.Tasks.StandStill(7000).WaitForCompletion(7000); if (nearestPed.Exists()) { if (!Functions.IsPedGettingArrested(nearestPed) && !Functions.IsPedArrested(nearestPed) && !Functions.IsPedStoppedByPlayer(nearestPed)) { nearestPed.Dismiss(); } } } else if (nearestPed.CurrentVehicle.Driver == nearestPed) { if (DoesPedHaveDrugsInSystem(nearestPed) && !TrafficPolicerHandler.PedsToChargeWithDrugDriving.Contains(nearestPed)) { TrafficPolicerHandler.PedsToChargeWithDrugDriving.Add(nearestPed); if (TrafficPolicerHandler.IsLSPDFRPlusRunning) { API.LSPDFRPlusFunctions.AddCountToStatistic(Main.PluginName, "People caught driving over drugs limit"); } } } } } } } } TrafficPolicerHandler.PerformingImpairmentTest = false; }); } }
public override void Process() { GameFiber.StartNew(delegate { if (_subject && _subject.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) < 35f && !_isArmed) { if (_Blip) { _Blip.Delete(); } _subject.Inventory.GiveNewWeapon(new WeaponAsset(wepList[new Random().Next((int)wepList.Length)]), 500, true); _isArmed = true; } if (_subject && _subject.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) < 50f && !_hasBegunAttacking) { if (_scenario > 40) { _subject.KeepTasks = true; new RelationshipGroup("AG"); new RelationshipGroup("VI"); _subject.RelationshipGroup = "AG"; _V1.RelationshipGroup = "VI"; _V2.RelationshipGroup = "VI"; _V3.RelationshipGroup = "VI"; Game.SetRelationshipBetweenRelationshipGroups("AG", "VI", Relationship.Hate); _subject.Tasks.FightAgainstClosestHatedTarget(1000f); GameFiber.Wait(2000); _subject.Tasks.FightAgainst(Game.LocalPlayer.Character); _hasBegunAttacking = true; GameFiber.Wait(600); } else { if (!_hasPursuitBegun) { _subject.KeepTasks = true; _subject.Tasks.FightAgainst(Game.LocalPlayer.Character); _hasBegunAttacking = true; GameFiber.Wait(2000); } } } if (Game.LocalPlayer.Character.IsDead) { End(); } if (Game.IsKeyDown(Settings.EndCall)) { End(); } if (_subject && _subject.IsDead) { End(); } if (_subject && Functions.IsPedArrested(_subject)) { End(); } }, "Armored Person [UnitedCallouts]"); base.Process(); }
public override void Process() { GameFiber.StartNew(delegate { if (_Aggressor.DistanceTo(Game.LocalPlayer.Character) < 25f && !_notificationDisplayed) { if (_Blip.Exists()) { _Blip.Delete(); } Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~w~DutchCallouts", "~y~Inbraak in een apartament", "~b~Meldkamer: ~w~Je bent in de buurt van het ~y~apartament~w~. Probeer de ~o~inbreker~w~ te arresteren."); Game.DisplayNotification("~b~Meldkamer:~w~ Agent gearriveerd. Wees voorzichtig"); _notificationDisplayed = true; } if (Game.LocalPlayer.Character.DistanceTo(_Victim) < 8f) { _Victim.PlayAmbientSpeech("GENERIC_SHOCKED_HIGH"); } if (_Aggressor.Exists() && _Aggressor.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) < 8f && !_hasBegunAttacking) { if (_scenario > 40) { new RelationshipGroup("AG"); new RelationshipGroup("VI"); _Aggressor.RelationshipGroup = "AG"; _Victim.RelationshipGroup = "VI"; Game.SetRelationshipBetweenRelationshipGroups("AG", "VI", Relationship.Hate); _Aggressor.Tasks.FightAgainstClosestHatedTarget(1000f); GameFiber.Wait(200); _Aggressor.Tasks.FightAgainst(Game.LocalPlayer.Character); _hasBegunAttacking = true; GameFiber.Wait(600); } else { if (!_hasPursuitBegun) { _Aggressor.Tasks.FightAgainst(Game.LocalPlayer.Character); _hasBegunAttacking = true; GameFiber.Wait(2000); } } } if (Game.LocalPlayer.Character.IsDead) { End(); } if (Game.IsKeyDown(Settings.EndCall)) { End(); } if (_Aggressor.IsDead) { End(); } if (Functions.IsPedArrested(_Aggressor)) { End(); } }, "Inbraak [DutchCallouts]"); base.Process(); }
public static void PedBackIntoVehicleLogic(Ped suspect, Vehicle suspectvehicle) { GameFiber.StartNew(delegate { try { while (true) { GameFiber.Yield(); if (!suspect.Exists() || !suspectvehicle.Exists()) { return; } else if (Functions.IsPedGettingArrested(suspect) || Functions.IsPedArrested(suspect) || suspect.IsDead) { return; } else if (Functions.IsPedStoppedByPlayer(suspect)) { while (Functions.IsPedStoppedByPlayer(suspect)) { GameFiber.Yield(); if (!suspect.Exists() || !suspectvehicle.Exists()) { return; } else if (Functions.IsPedGettingArrested(suspect) || Functions.IsPedArrested(suspect) || suspect.IsDead) { return; } } if (suspect.DistanceTo(suspectvehicle) < 25f) { suspect.IsPersistent = true; suspect.BlockPermanentEvents = true; suspectvehicle.IsPersistent = true; suspect.Tasks.FollowNavigationMeshToPosition(suspectvehicle.GetOffsetPosition(Vector3.RelativeLeft * 2f), suspectvehicle.Heading, 1.45f).WaitForCompletion(10000); if (suspectvehicle.GetFreeSeatIndex() != null) { int?freeseat = suspectvehicle.GetFreeSeatIndex(); suspect.Tasks.EnterVehicle(suspectvehicle, 6000, freeseat == null ? -1 : freeseat.Value).WaitForCompletion(6100); } } suspect.Dismiss(); suspectvehicle.Dismiss(); return; } } } catch (System.Threading.ThreadAbortException e) { } catch (Exception e) { Game.LogTrivial(e.ToString()); if (suspect.Exists()) { suspect.Dismiss(); } if (suspectvehicle) { suspectvehicle.Dismiss(); } } }); }
public override void Process() { GameFiber.StartNew(delegate { if (_SpawnPoint.DistanceTo(Game.LocalPlayer.Character) < 25f) { if (_Scene1 == true && _subject.DistanceTo(Game.LocalPlayer.Character) < 10f && Game.LocalPlayer.Character.IsOnFoot && !_notificationDisplayed && !_getAmbulance) { Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~w~DutchCallouts", "~y~Meldkamer", "We gaan een ~y~ambulance~w~ sturen naar je huidige locatie, agent, druk op de ~y~END~w~ toets om de callout de beëindigen."); _notificationDisplayed = true; GameFiber.Wait(1000); Game.DisplayHelp("Druk op ~y~END~w~ om de callout af te sluiten. De situatie is ~g~ CODE 4~w~."); Functions.RequestBackup(Game.LocalPlayer.Character.Position, LSPD_First_Response.EBackupResponseType.Code3, LSPD_First_Response.EBackupUnitType.Ambulance); _getAmbulance = true; } if (_Scene2 == true && _SpawnPoint.DistanceTo(Game.LocalPlayer.Character) < 8f && Game.LocalPlayer.Character.IsOnFoot && !_notificationDisplayed) { Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~w~DutchCallouts", "~y~Meldkamer", "Er is niemand thuis... <br>Je bent ~g~CODE 4~w~."); _notificationDisplayed = true; GameFiber.Wait(1000); End(); } if (_Scene3 == true && _subject.DistanceTo(Game.LocalPlayer.Character) < 25f && Game.LocalPlayer.Character.IsOnFoot && _alreadySubtitleIntrod == false) { Game.DisplaySubtitle("Druk op ~y~Y ~w~om met de verdachte te spreken.", 5000); _alreadySubtitleIntrod = true; _wasClose = true; } if (_Scene3 == true && _Scene1 == false && _Scene2 == false && _subject.DistanceTo(Game.LocalPlayer.Character) < 2f && Game.IsKeyDown(Settings.Dialog)) { _subject.Face(Game.LocalPlayer.Character); switch (_storyLine) { case 1: Game.DisplaySubtitle("~y~Verdachte: ~w~Hallo agent, wat is er aan de hand? (1/5)", 5000); _storyLine++; break; case 2: Game.DisplaySubtitle("~b~Agent: ~w~Hallo, je had vandaag naar de dokter gemoeten voor een controle, maar je reageerde niet.. (2/5)", 5000); _storyLine++; break; case 3: Game.DisplaySubtitle("~y~Verdachte: ~w~Oh nee, dat was ik vergeten! (3/5)", 5000); _storyLine++; break; case 4: if (_callOutMessage == 1) { Game.DisplaySubtitle("~y~Verdachte: ~w~Ik ben vanmorgen mijn telefoon verloren. ik kan 'm nergens vinden... (4/5)", 5000); } if (_callOutMessage == 2) { Game.DisplaySubtitle("~y~Verdachte: ~w~De batterij van m'n telefoon was leeg.... (4/5)", 5000); } if (_callOutMessage == 3) { Game.DisplaySubtitle("~y~Verdachte: ~w~Ik zal thuis direct naar de dokter bellen! (4/5)", 5000); } _storyLine++; break; case 5: if (_callOutMessage == 1) { Game.DisplaySubtitle("~b~Agent: ~w~Hm, dat is vervelend, we laten de dokter weten dat alles in orde is. (5/5)", 5000); } Game.DisplayHelp("Druk op ~y~END~w~ om de ~o~Gezondheidscontrole~w~ te beëindigen. De situatie is ~g~ CODE 4~w~.", 5000); if (_callOutMessage == 2) { Game.DisplaySubtitle("~b~Agent: ~w~Prima, zodra de batterij weer opgeladen is bel je de dokter. (5/5)", 5000); } Game.DisplayHelp("Druk op ~y~END~w~ om de ~o~Gezondheidscontrole~w~ te beëindigen. De situatie is ~g~ CODE 4~w~.", 5000); if (_callOutMessage == 3) { Game.DisplaySubtitle("~b~Agent: ~w~Prima, fijne middag verder! (5/5)", 5000); } Game.DisplayHelp("Druk op ~y~END~w~ om de ~o~Gezondheidscontrole~w~ te beëindigen. De situatie is ~g~ CODE 4~w~.", 5000); _storyLine++; break; case 6: if (_callOutMessage == 1) { End(); } if (_callOutMessage == 2) { End(); } if (_callOutMessage == 3) { End(); } _storyLine++; break; default: break; } } } if (Game.IsKeyDown(Settings.EndCall)) { End(); } if (Game.LocalPlayer.Character.IsDead) { End(); } }, "GezondheidCheck [DutchCallouts]"); base.Process(); }
public override void Process() { GameFiber.StartNew(delegate { if (_SpawnPoint.DistanceTo(Game.LocalPlayer.Character) < 25f) { if (_Scene1 == true && _subject.DistanceTo(Game.LocalPlayer.Character) < 10f && Game.LocalPlayer.Character.IsOnFoot && !_notificationDisplayed && !_getAmbulance) { Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~w~UnitedCallouts", "~y~Dispatch", "We are going to call a ~y~ambulance~w~ to you're current location, Officer. Press the ~y~END~w~ key to end the welfare check callout."); _notificationDisplayed = true; GameFiber.Wait(1000); Game.DisplayHelp("Press the ~y~END~w~ key to end the wellfare check callout. The callout is ~g~CODE 4~w~."); Functions.RequestBackup(Game.LocalPlayer.Character.Position, LSPD_First_Response.EBackupResponseType.Code3, LSPD_First_Response.EBackupUnitType.Ambulance); _getAmbulance = true; } if (_Scene2 == true && _SpawnPoint.DistanceTo(Game.LocalPlayer.Character) < 8f && Game.LocalPlayer.Character.IsOnFoot && !_notificationDisplayed) { Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~w~UnitedCallouts", "~y~Dispatch", "No one is at home.<br>You are ~g~code 4~w~."); _notificationDisplayed = true; GameFiber.Wait(1000); End(); } if (_Scene3 == true && _subject.DistanceTo(Game.LocalPlayer.Character) < 25f && Game.LocalPlayer.Character.IsOnFoot && _alreadySubtitleIntrod == false) { Game.DisplaySubtitle("Press ~y~Y ~w~to speak with the suspect.", 5000); _alreadySubtitleIntrod = true; _wasClose = true; } if (_Scene3 == true && _Scene1 == false && _Scene2 == false && _subject.DistanceTo(Game.LocalPlayer.Character) < 2f && Game.IsKeyDown(Settings.Dialog)) { _subject.Face(Game.LocalPlayer.Character); switch (_storyLine) { case 1: Game.DisplaySubtitle("~y~Suspect: ~w~Hello Officer, how can I help you? Is everything alright? (1/5)", 5000); _storyLine++; break; case 2: Game.DisplaySubtitle("~b~You: ~w~Hello, we got a call for a welfare check, because you didn't response to the call. (2/5)", 5000); _storyLine++; break; case 3: Game.DisplaySubtitle("~y~Suspect: ~w~Oh no, I forgot that. (3/5)", 5000); _storyLine++; break; case 4: if (_callOutMessage == 1) { Game.DisplaySubtitle("~y~Suspect: ~w~I lost my phone today. I can't find it. (4/5)", 5000); } if (_callOutMessage == 2) { Game.DisplaySubtitle("~y~Suspect: ~w~The battery of my phone was empty. (4/5)", 5000); } if (_callOutMessage == 3) { Game.DisplaySubtitle("~y~Suspect: ~w~Okay, I'll definitely call back now. Thank you! (4/5)", 5000); } _storyLine++; break; case 5: if (_callOutMessage == 1) { Game.DisplaySubtitle("~b~You: ~w~Hm, that is annoying. We will let the caller know, that everything is alright. (5/5)", 5000); } Game.DisplayHelp("Press the ~y~END~w~ key to end the ~o~welfare check~w~ callout. The callout is ~g~ CODE 4~w~."); if (_callOutMessage == 2) { Game.DisplaySubtitle("~b~You: ~w~Okay, everything is alright. If the battery is full now, you can call back. (5/5)", 5000); } Game.DisplayHelp("Press the ~y~END~w~ key to end the ~o~welfare check~w~ callout. The callout is ~g~ CODE 4~w~."); if (_callOutMessage == 3) { Game.DisplaySubtitle("~b~You: ~w~Alright, no problem! Have a nice day. (5/5)", 5000); } Game.DisplayHelp("Press the ~y~END~w~ key to end the ~o~welfare check~w~ callout. The callout is ~g~ CODE 4~w~."); _storyLine++; break; case 6: if (_callOutMessage == 1) { End(); } if (_callOutMessage == 2) { End(); } if (_callOutMessage == 3) { End(); } _storyLine++; break; default: break; } } } if (Game.IsKeyDown(Settings.EndCall)) { End(); } if (Game.LocalPlayer.Character.IsDead) { End(); } }, "WellfareCheck [UnitedCallouts]"); base.Process(); }
public override void Process() { GameFiber.StartNew(delegate { if (_subject.DistanceTo(Game.LocalPlayer.Character) < 20f && !_wasClose) { Functions.PlayScannerAudio("ATTENTION_THIS_IS_DISPATCH_HIGH OFFICERS_ARRIVED_ON_SCENE"); _wasClose = true; if (_attack == true && !HasWeapon) { _subject.Inventory.GiveNewWeapon(new WeaponAsset(wepList[new Random().Next((int)wepList.Length)]), 500, true); HasWeapon = true; _subject.Tasks.FightAgainst(Game.LocalPlayer.Character); } if (_attack == false && _subject.DistanceTo(Game.LocalPlayer.Character) < 10f && Game.LocalPlayer.Character.IsOnFoot && _alreadySubtitleIntrod == false) { Game.DisplaySubtitle("Press ~y~Y ~w~to speak with the person.", 5000); _alreadySubtitleIntrod = true; _wasClose = true; } if (_attack == false && _subject.DistanceTo(Game.LocalPlayer.Character) < 2f && Game.IsKeyDown(Settings.Dialog)) { _subject.Face(Game.LocalPlayer.Character); switch (storyLine) { case 1: Game.DisplaySubtitle("~y~Suspect: ~w~Hello Officer! Can I help you? (1/5)", 5000); storyLine++; break; case 2: Game.DisplaySubtitle("~b~You: ~w~We have a warrant for your arrest. (2/5)", 5000); storyLine++; break; case 3: Game.DisplaySubtitle("~y~Suspect: ~w~...me? Are you sure? (3/5)", 5000); storyLine++; break; case 4: if (_callOutMessage == 1) { Game.DisplaySubtitle("~b~You: ~w~I have to arrest you because we have an arrest warrant against you. You need to come with me. (4/5)", 5000); } if (_callOutMessage == 2) { Game.DisplaySubtitle("~b~You: ~w~Tell that to the court. Don't make this hard! (4/5)", 5000); } if (_callOutMessage == 3) { Game.DisplaySubtitle("~b~You: ~w~Tell that to the court. Don't make this harder than what it needs to be! (4/5)", 5000); } storyLine++; break; case 5: if (_callOutMessage == 1) { _subject.Tasks.PutHandsUp(-1, Game.LocalPlayer.Character); Game.DisplaySubtitle("~y~Suspect: ~w~Okay, fine. (5/5)", 5000); } if (_callOutMessage == 2) { Game.DisplaySubtitle("~y~Suspect: ~w~You're not taking me in, you pig! (5/5)", 5000); _subject.Inventory.GiveNewWeapon("WEAPON_PISTOL", 500, true); Rage.Native.NativeFunction.CallByName <uint>("TASK_COMBAT_PED", _subject, Game.LocalPlayer.Character, 0, 16); } if (_callOutMessage == 3) { Game.DisplaySubtitle("~y~Suspect: ~w~I'm not going with you... I'm sorry but I can't go back to prison! (5/5)", 5000); _subject.Inventory.GiveNewWeapon("WEAPON_KNIFE", 500, true); Rage.Native.NativeFunction.CallByName <uint>("TASK_COMBAT_PED", _subject, Game.LocalPlayer.Character, 0, 16); } storyLine++; break; default: break; } } } if (Game.LocalPlayer.Character.IsDead) { End(); } if (Game.IsKeyDown(Settings.EndCall)) { End(); } if (_subject && _subject.IsDead) { End(); } if (_subject && Functions.IsPedArrested(_subject)) { End(); } }, "ArrestWarrant [UnitedCallouts]"); base.Process(); }
public override void Process() { base.Process(); if (this.calloutStage == Stages.Beginning) { Game.DisplayHelp("Press ~b~ Y~s~ to speak to customer when in the store"); this.calloutStage = Stages.Dialogue; } else if (this.calloutStage == Stages.Dialogue) { this.HaveConversation(); if (!this.hasPedLooked && karen.DistanceTo(Game.LocalPlayer.Character) <= 3f) { Game.DisplayHelp("Player is in range to be looked at"); NativeFunction.Natives.TASK_TURN_PED_TO_FACE_ENTITY(karen, Game.LocalPlayer.Character, -1); this.hasPedLooked = true; } } else if (this.calloutStage == Stages.PostDialogue) { // This will decide which alternative ending to run and then run it on a new fiber. Random r = new Random(); int chance = r.Next(0, 100); //SituationLeavePeacefully(); -- CHECKED, works //SituationLeaveAggressively(); -- CHECKED, works //SituationLeaveViolently(); -- CHECKED, works //SituationLeaveViolently(true); -- CHECKED, works if (chance < 30) { Game.DisplayNotification("Starting SituationLeavePeacefully()"); SituationLeavePeacefully(); } else if (chance < 60) { Game.DisplayNotification("Starting SituationLeaveAggressively()"); SituationLeaveAggressively(); } else if (chance < 85) { Game.DisplayNotification("Starting SituationLeaveViolently()"); SituationLeaveViolently(); } else { Game.DisplayNotification("Starting SituationLeaveViolently(true)"); SituationLeaveViolently(true); } this.calloutStage = Stages.Action; } if (karen.IsDead || Functions.IsPedArrested(karen) || this.calloutStage == Stages.End) { End(); } if (karen.IsRagdoll) { Functions.SetPedCantBeArrestedByPlayer(karen, false); karen.Tasks.Clear(); } }
public override void Process() { base.Process(); GameFiber.StartNew(delegate { if (Seller.DistanceTo(Game.LocalPlayer.Character) < 18f) { if (attack == true && startedPursuit == false) { pursuit = Functions.CreatePursuit(); Functions.AddPedToPursuit(pursuit, Seller); Functions.AddPedToPursuit(pursuit, Buyer); Functions.SetPursuitIsActiveForPlayer(pursuit, true); startedPursuit = true; } if (Seller.DistanceTo(Game.LocalPlayer.Character) < 15f && Game.LocalPlayer.Character.IsOnFoot && alreadySubtitleIntrod == false && pursuit == null) { Game.DisplaySubtitle("Press ~y~Y ~w~to speak with the Seller", 5000); Buyer.Face(Car); Seller.Face(Game.LocalPlayer.Character); alreadySubtitleIntrod = true; wasClose = true; } if (attack == false && Seller.DistanceTo(Game.LocalPlayer.Character) < 2f && Game.IsKeyDown(System.Windows.Forms.Keys.Y)) { Seller.Face(Game.LocalPlayer.Character); switch (storyLine) { case 1: Game.DisplaySubtitle("~y~Seller: ~w~Oh, hello Officer, I didn't hear you. How can I help?", 5000); storyLine++; break; case 2: Game.DisplaySubtitle("~b~You: ~w~Are you the owner?", 5000); storyLine++; break; case 3: Game.DisplaySubtitle("~y~Suspect: ~w~ah...yes I am the owner! Is anything wrong? ", 5000); storyLine++; break; case 4: if (calloutm == 1) { Game.DisplaySubtitle("~b~You: ~w~Why is there a police car?", 5000); } if (calloutm == 2) { Game.DisplaySubtitle("~b~You: ~w~Who is the guy next to the police vehicle?", 5000); } if (calloutm == 3) { Game.DisplaySubtitle("~b~You: ~w~If you are the owner, I'll need to arrest you.", 5000); } storyLine++; break; case 5: if (calloutm == 1) { Game.DisplaySubtitle("~y~Suspect: ~w~I don't know. I came in and the police car was here.", 5000); } Game.DisplayNotification("3dtextures", "mpgroundlogo_cops", "~w~ExampleCallouts", "~y~Dispatch", "The plate of the ~b~" + Car.Model.Name + "~w~ is ~o~" + Car.LicensePlate + "~w~. The car was ~r~stolen~w~ from the police station in ~b~Mission Row~w~."); Game.DisplayHelp("Arrest the owner and the buyer."); if (calloutm == 2) { Game.DisplaySubtitle("~y~Suspect: ~w~Only a friend!", 5000); Buyer.Inventory.GiveNewWeapon("WEAPON_PISTOL", 500, true); Rage.Native.NativeFunction.CallByName <uint>("TASK_COMBAT_PED", Buyer, Game.LocalPlayer.Character, 0, 16); } if (calloutm == 3) { Game.DisplaySubtitle("~y~Suspect: ~w~No, why?", 5000); Seller.Inventory.GiveNewWeapon("WEAPON_KNIFE", 500, true); Rage.Native.NativeFunction.CallByName <uint>("TASK_COMBAT_PED", Seller, Game.LocalPlayer.Character, 0, 16); Rage.Native.NativeFunction.CallByName <uint>("TASK_COMBAT_PED", Buyer, Game.LocalPlayer.Character, 0, 16); } storyLine++; if (Common.rand.Next(1, 4) == 4) { this.pursuit = Functions.CreatePursuit(); Functions.AddPedToPursuit(this.pursuit, Seller); Functions.AddPedToPursuit(this.pursuit, Buyer); startedPursuit = true; } break; default: break; } } } if (Seller.Exists() && Functions.IsPedArrested(Seller) && attack && Seller.DistanceTo(Game.LocalPlayer.Character) < 8f && !hasTalkedBack) { Game.DisplaySubtitle("~y~Seller: ~w~I don't know, whats wrong with me...", 4000); hasTalkedBack = true; } if (Buyer.Exists() && Functions.IsPedArrested(Buyer) && attack && Buyer.DistanceTo(Game.LocalPlayer.Character) < 8f && !hasTalkedBack) { Game.DisplaySubtitle("~y~Buyer: ~w~I only wanted to safe me with a police car!", 4000); hasTalkedBack = true; } if (Seller.DistanceTo(Game.LocalPlayer.Character) >= 200f && wasClose) { if (startedPursuit) { Game.DisplaySubtitle("The Seller escaped!", 4300); } this.End(); } if (Buyer.DistanceTo(Game.LocalPlayer.Character) >= 200f && wasClose) { if (startedPursuit) { Game.DisplaySubtitle("The Buyer escaped!", 4300); } this.End(); } if (Seller.IsDead || !Seller.Exists() || Functions.IsPedArrested(Seller)) { this.End(); } if (Buyer.IsDead || !Buyer.Exists() || Functions.IsPedArrested(Buyer)) { this.End(); } if (this.pursuit != null && !Functions.IsPursuitStillRunning(this.pursuit)) { this.End(); } }, "CarTrade [ExampleCallouts]"); }
public override void Process() { GameFiber.StartNew(delegate { if (_subject.DistanceTo(Game.LocalPlayer.Character) < 20f) { if (_attack == true && _startedPursuit == false) { _subject.Tasks.FightAgainst(Game.LocalPlayer.Character); } if (_attack == false && _subject.DistanceTo(Game.LocalPlayer.Character) < 6f && Game.LocalPlayer.Character.IsOnFoot && _alreadySubtitleIntrod == false) { Game.DisplaySubtitle("Press ~y~Y ~w~to speak with the troublemaker.", 5000); _subject.Face(Game.LocalPlayer.Character); _alreadySubtitleIntrod = true; _wasClose = true; if (_Blip.Exists()) { _Blip.Delete(); } } if (_subject.DistanceTo(Game.LocalPlayer.Character) < 5f && Game.LocalPlayer.Character.IsOnFoot && _alreadySubtitleIntrod == false) { _subject.Tasks.AchieveHeading(Game.LocalPlayer.Character.Heading); } if (_attack == false && _subject.DistanceTo(Game.LocalPlayer.Character) < 2f && Game.IsKeyDown(Settings.Dialog)) { _subject.Face(Game.LocalPlayer.Character); switch (_storyLine) { case 1: Game.DisplaySubtitle("~r~troublemaker: ~w~Hello Officer! Do you have a problem? (1/5)", 5000); _storyLine++; break; case 2: Game.DisplaySubtitle("~b~You: ~w~Are you the guy, who is doing some problems around the metro station? (2/5)", 5000); _storyLine++; break; case 3: Game.DisplaySubtitle("~r~troublemaker: ~w~...No! (3/5)", 5000); _storyLine++; break; case 4: if (_callOutMessage == 1) { Game.DisplaySubtitle("~b~You: ~w~So, someone showed us a video about you, where you are really offensive and you hit someone. (4/5)", 5000); } if (_callOutMessage == 2) { Game.DisplaySubtitle("~b~You: ~w~Alright, but someone called the police against a person, who is looking like you. (4/5)", 5000); } if (_callOutMessage == 3) { Game.DisplaySubtitle("~b~You: ~w~hmm, are you really sure? (4/5)", 5000); } _storyLine++; break; case 5: if (_callOutMessage == 1) { _subject.Tasks.PutHandsUp(-1, Game.LocalPlayer.Character); Game.DisplaySubtitle("~r~troublemaker: ~w~Okay, I hit someone and ran away. (5/5)", 5000); } if (_callOutMessage == 2) { Game.DisplaySubtitle("~r~troublemaker: ~w~F**k off! (5/5)", 5000); _subject.Inventory.GiveNewWeapon("WEAPON_KNIFE", 500, true); Rage.Native.NativeFunction.CallByName <uint>("TASK_COMBAT_PED", _subject, Game.LocalPlayer.Character, 0, 16); } if (_callOutMessage == 3) { Game.DisplaySubtitle("~r~troublemaker: ~w~Asshole! (5/5)", 5000); _subject.Inventory.GiveNewWeapon("WEAPON_MOLOTOV", 500, true); Rage.Native.NativeFunction.CallByName <uint>("TASK_COMBAT_PED", _subject, Game.LocalPlayer.Character, 0, 16); } _storyLine++; break; default: break; } } } if (Game.LocalPlayer.Character.IsDead) { End(); } if (Game.IsKeyDown(Settings.EndCall)) { End(); } if (_subject.IsDead) { End(); } if (Functions.IsPedArrested(_subject)) { End(); } }, "WantedPerson [UnitedCallouts]"); base.Process(); }
public override void Process() { GameFiber.StartNew(delegate { if (_verdachte.DistanceTo(Game.LocalPlayer.Character) < 20f) { if (_attack == true && !HasWeapon) { _verdachte.Inventory.GiveNewWeapon(new WeaponAsset(wapens[new Random().Next((int)wapens.Length)]), 500, true); HasWeapon = true; _verdachte.Tasks.FightAgainst(Game.LocalPlayer.Character); } if (_attack == false && _verdachte.DistanceTo(Game.LocalPlayer.Character) < 10f && Game.LocalPlayer.Character.IsOnFoot && _alreadySubtitleIntrod == false) { Game.DisplaySubtitle("Druk op ~y~Y ~w~om te spreken met de verdachte.", 5000); _alreadySubtitleIntrod = true; _wasClose = true; } if (_attack == false && _verdachte.DistanceTo(Game.LocalPlayer.Character) < 2f && Game.IsKeyDown(Settings.Dialog)) { _verdachte.Face(Game.LocalPlayer.Character); switch (storyLine) { case 1: Game.DisplaySubtitle("~y~Verdachte: ~w~Hallo meneer, kan ik u ergens mee helpen?", 5000); storyLine++; break; case 2: Game.DisplaySubtitle("~b~Agent: ~w~Hallo, je wordt gezocht door de politie.", 5000); storyLine++; break; case 3: Game.DisplaySubtitle("~y~Verdachte: ~w~ik...? Weet je dat zeker?", 5000); storyLine++; break; case 4: if (_callOutMessage == 1) { Game.DisplaySubtitle("~b~Agent: ~w~Ik moet je arresteren, omdat je gezocht wordt door de politie, kom met mij mee", 5000); } if (_callOutMessage == 2) { Game.DisplaySubtitle("~b~Agent: ~w~Ik moet je arresteren, omdat je gezocht wordt door de politie.", 5000); } if (_callOutMessage == 3) { Game.DisplaySubtitle("~b~Agent: ~w~Ik moet je arresteren, omdat je gezocht wordt door de politie.", 5000); } storyLine++; break; case 5: if (_callOutMessage == 1) { _verdachte.Tasks.PutHandsUp(-1, Game.LocalPlayer.Character); Game.DisplaySubtitle("~y~Verdachte: ~w~OK, OK, arresteer mij, ik heb iets vreselijks gedaan", 5000); } if (_callOutMessage == 2) { Game.DisplaySubtitle("~y~Verdachte: ~w~Alsjeblieft, arresteer me niet!!!", 5000); _verdachte.Inventory.GiveNewWeapon("WEAPON_PISTOL", 500, true); Rage.Native.NativeFunction.CallByName <uint>("TASK_COMBAT_PED", _verdachte, Game.LocalPlayer.Character, 0, 16); } if (_callOutMessage == 3) { Game.DisplaySubtitle("~y~Verdachte: ~w~Ik ben onschuldig!", 5000); _verdachte.Inventory.GiveNewWeapon("WEAPON_KNIFE", 500, true); Rage.Native.NativeFunction.CallByName <uint>("TASK_COMBAT_PED", _verdachte, Game.LocalPlayer.Character, 0, 16); } storyLine++; break; default: break; } } } if (Game.LocalPlayer.Character.IsDead) { End(); } if (Game.IsKeyDown(Settings.EndCall)) { End(); } if (_verdachte.IsDead) { End(); } if (Functions.IsPedArrested(_verdachte)) { End(); } }, "Gezocht [DutchCallouts]"); base.Process(); }
public override void Process() { GameFiber.StartNew(delegate { if (_Dealer.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) < 75f && !_isArmed) { _Dealer.Face(_Victim); _Victim.Face(_Dealer); _Dealer.Inventory.GiveNewWeapon(new WeaponAsset(wepList[new Random().Next((int)wepList.Length)]), 500, true); _isArmed = true; } if (_Dealer.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) < 60f && !_hasBegunAttacking) { if (_scenario > 40) { new RelationshipGroup("AG"); new RelationshipGroup("VI"); _Dealer.RelationshipGroup = "AG"; _Victim.RelationshipGroup = "AG"; Game.LocalPlayer.Character.RelationshipGroup = "VI"; Game.SetRelationshipBetweenRelationshipGroups("AG", "VI", Relationship.Hate); _Dealer.Tasks.FightAgainst(Game.LocalPlayer.Character); Game.DisplayNotification("Arrest the ~o~buyer~w~ who is surrendering!"); _Victim.Tasks.PutHandsUp(-1, Game.LocalPlayer.Character); _hasBegunAttacking = true; GameFiber.Wait(2000); } else { if (!_hasPursuitBegun) { _pursuit = Functions.CreatePursuit(); Functions.AddPedToPursuit(_pursuit, _Dealer); Functions.AddPedToPursuit(_pursuit, _Victim); Functions.SetPursuitIsActiveForPlayer(_pursuit, true); _hasPursuitBegun = true; } } } if (Game.LocalPlayer.Character.IsDead) { End(); } if (Game.IsKeyDown(Settings.EndCall)) { End(); } if (_Dealer && _Dealer.IsDead && _Blip || _Dealer && Functions.IsPedArrested(_Dealer) && _Blip) { _Blip.Delete(); } if (_Victim && _Victim.IsDead && _Blip2 || _Victim && Functions.IsPedArrested(_Victim) && _Blip2) { _Blip2.Delete(); } if (_Victim && _Victim.IsDead && _Dealer && _Dealer.IsDead) { End(); } if (_Victim && Functions.IsPedArrested(_Victim) && _Dealer && Functions.IsPedArrested(_Dealer)) { End(); } if (_Victim && Functions.IsPedArrested(_Victim) && _Dealer && _Dealer.IsDead) { End(); } if (_Dealer && Functions.IsPedArrested(_Dealer) && _Victim && _Victim.IsDead) { End(); } }, "DrugDeal [UnitedCallouts]"); base.Process(); }
public override void Process() { if (_Car.DistanceTo(Game.LocalPlayer.Character) < 50f && !_notificationDisplayed && _alreadySubtitleIntrod == false && _pursuit == null) { Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~w~UnitedCallouts Computer", "~y~DrugDealer Information", "The car from the dealer is a ~o~" + _Car.Model.Name + "~w~. The plate of the car is ~b~" + _Car.LicensePlate + "~w~."); _notificationDisplayed = true; } GameFiber.StartNew(delegate { if (_subject.DistanceTo(Game.LocalPlayer.Character) < 25f) { if (_hasDrugs == true && _startedPursuit == false) { _pursuit = Functions.CreatePursuit(); Functions.AddPedToPursuit(_pursuit, _subject); Functions.SetPursuitIsActiveForPlayer(_pursuit, true); _startedPursuit = true; } if (_subject.DistanceTo(Game.LocalPlayer.Character) < 25f && Game.LocalPlayer.Character.IsOnFoot && !_notificationDisplayed && _alreadySubtitleIntrod == false && _pursuit == null) { Game.DisplaySubtitle("Press ~y~Y ~w~to speak with the Dealer.", 5000); _alreadySubtitleIntrod = true; _wasClose = true; _notificationDisplayed = true; } if (_hasDrugs == false && _subject.DistanceTo(Game.LocalPlayer.Character) < 15f && Game.IsKeyDown(Settings.Dialog)) { switch (_storyLine) { case 1: Game.DisplaySubtitle("~y~Suspect: ~w~I was about to pick up furniture!(1/3)", 5000); _storyLine++; break; case 2: Game.DisplaySubtitle("~b~You: ~w~Okay, relax buddy. Where are you coming from?(2/3)", 5000); _storyLine++; break; case 3: Game.DisplaySubtitle("~y~Suspect: ~w~I come from home to help my friend move with the furniture. (3/3)", 5000); _storyLine++; break; case 4: if (_callOutMessage == 1) { Game.DisplaySubtitle("~b~You: ~w~How come we have people saying you've been peering into vehicles?(1/2)", 5000); } if (_callOutMessage == 2) { Game.DisplaySubtitle("~b~You: ~w~Why do we have some people saying they saw someone dealing drugs around here?(1/2)", 5000); } if (_callOutMessage == 3) { Game.DisplaySubtitle("~b~You: ~w~What if I told you I saw you making a hand to hand transaction with someone back a few blocks?(1/2)", 5000); } _storyLine++; break; case 5: if (_callOutMessage == 1) { Game.DisplaySubtitle("~y~Suspect: ~w~I have nothing to do with that!(2/2)", 5000); _subject.Inventory.GiveNewWeapon(new WeaponDescriptor("WEAPON_PISTOL"), 56, false); Rage.Native.NativeFunction.CallByName <uint>("TASK_COMBAT_PED", _subject, Game.LocalPlayer.Character, 0, 16); } if (_callOutMessage == 2) { Game.DisplaySubtitle("~y~Suspect: ~w~I'm not like that, sir. (2/2)", 5000); } if (_callOutMessage == 3) { Game.DisplaySubtitle("~y~Suspect: ~w~Yeah, right! And where was that? I know my rights sir! (2/2)", 5000); } _storyLine++; break; default: break; } } } if (Game.LocalPlayer.Character.IsDead) { End(); } if (Game.IsKeyDown(Settings.EndCall)) { End(); } if (_subject.IsDead) { End(); } if (Functions.IsPedArrested(_subject)) { End(); } }, "DrugDealer [UnitedCallouts]"); base.Process(); }
public override void Process() { GameFiber.StartNew(delegate { if (suspect.Exists() && suspect.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) < 40f) { suspect.KeepTasks = true; if (locationBlip.Exists()) { locationBlip.Delete(); } GameFiber.Wait(2000); } if (suspect.Exists() && suspect.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) < 40f && !attacking) { if (decision == 1) { // Set relationships for peds new RelationshipGroup("attacker"); new RelationshipGroup("victim"); suspect.RelationshipGroup = "attacker"; witness1.RelationshipGroup = "victim"; witness2.RelationshipGroup = "victim"; suspect.KeepTasks = true; // Make suspect shoot with weapon Game.SetRelationshipBetweenRelationshipGroups("attacker", "victim", Relationship.Hate); suspect.Tasks.FightAgainstClosestHatedTarget(1000f); Game.LogTrivial("[FireyCalouts][Debug-log] Firework: suspect attacking"); GameFiber.Wait(2000); // Make suspect attack player suspect.Tasks.FightAgainst(Game.LocalPlayer.Character); attacking = true; Game.LogTrivial("[FireyCalouts][Debug-log] Firework: dec-1 finish"); GameFiber.Wait(1000); } else { // Create pursuit (if none exists yet) if (!pursuitCreated && suspect.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) < 30f) { pursuit = Functions.CreatePursuit(); Functions.AddPedToPursuit(pursuit, suspect); Functions.SetPursuitIsActiveForPlayer(pursuit, true); pursuitCreated = true; Game.LogTrivial("[FireyCalouts][Debug-log] Pursuit started"); } } } if (Game.LocalPlayer.Character.IsDead) { End(); } if (suspect.Exists()) { if (suspect.IsDead) { End(); } } if (Game.IsKeyDown(Initialization.endKey)) { End(); } if (suspect.Exists()) { if (Functions.IsPedArrested(suspect)) { End(); } } }, "IllegalFirework [FireyCallouts]"); base.Process(); }
public override void Process() { base.Process(); GameFiber.StartNew(delegate { if (playerPed.IsDead) { this.End(); } if (Dealer.DistanceTo(playerPed.GetOffsetPosition(Vector3.RelativeFront)) < 75f && !isArmed) { Dealer.Face(Victim); Victim.Face(Dealer); Dealer.Inventory.GiveNewWeapon(new WeaponAsset(wepList[Common.rand.Next((int)wepList.Length)]), 500, true); isArmed = true; } if (Dealer.Exists() && Dealer.DistanceTo(playerPed.GetOffsetPosition(Vector3.RelativeFront)) < 60f && !hasBegunAttacking) { if (scenario > 40) { new RelationshipGroup("AG"); new RelationshipGroup("Vi"); Dealer.RelationshipGroup = "AG"; Victim.RelationshipGroup = "AG"; playerPed.RelationshipGroup = "VI"; Game.SetRelationshipBetweenRelationshipGroups("AG", "VI", Relationship.Hate); Dealer.KeepTasks = true; Dealer.Tasks.FightAgainst(playerPed); Game.DisplayNotification("Arrest the ~o~buyer~w~, who is surrendering!"); Victim.Tasks.PutHandsUp(-1, Game.LocalPlayer.Character); hasBegunAttacking = true; GameFiber.Wait(2000); } else { if (!pursuitS) { pursuit = Functions.CreatePursuit(); Functions.AddPedToPursuit(pursuit, Dealer); Functions.AddPedToPursuit(pursuit, Victim); Functions.SetPursuitIsActiveForPlayer(pursuit, true); pursuitS = true; } } } if (Dealer.IsDead && Victim.IsDead) { End(); } if (Functions.IsPedArrested(Dealer)) { End(); } if (!Dealer.Exists()) { End(); } if (Dealer == null) { End(); } if (pursuit != null && !Functions.IsPursuitStillRunning(pursuit)) { End(); } }, "DrugDeal [ExampleCallouts]"); }
public override void Process() { base.Process(); GameFiber.StartNew(delegate { // Distance plane - player is < 40 if (suspect.Exists() && suspectVehicle.Exists() && suspect.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) < 40f && !distanceCheck) { suspect.KeepTasks = true; suspectVehicle.EngineHealth = 1; if (suspectBlip.Exists()) { suspectBlip.Delete(); } distanceCheck = true; GameFiber.Wait(2000); } // Plane touchdown if (suspectVehicle.Exists() && suspect.Exists() && suspectVehicle.DistanceTo(landPoint) < 5f && (landingSituation == 0)) { // Explode if the plane is dedicated to crash if (willCrash) { suspect.Tasks.CruiseWithVehicle(10f); suspectVehicle.Explode(); } else { suspect.Tasks.PerformDrivingManeuver(VehicleManeuver.GoForwardStraightBraking); } landingSituation = 1; // Call Backup (Ambulance, Fire and Police) CallBackup(); Game.LogTrivial("[FireyCallouts][Debug] Landed."); GameFiber.Wait(3000); } if (landingSituation == 1 && !suspect.IsDead && suspectVehicle.Velocity == Vector3.Zero) { suspect.Tasks.LeaveVehicle(suspectVehicle, LeaveVehicleFlags.BailOut); } if (Game.LocalPlayer.Character.IsDead) { End(); } if (Game.IsKeyDown(Initialization.endKey)) { End(); } if (suspect.Exists()) { if (Functions.IsPedArrested(suspect)) { End(); } } }, "PlaneLanding [FireyCallouts]"); }
public override void Process() { GameFiber.StartNew(delegate { if (_SpawnPoint.DistanceTo(Game.LocalPlayer.Character) < 25f) { if (_Scene1 == true && _Scene3 == false && _Scene2 == false && _Cop.DistanceTo(Game.LocalPlayer.Character) < 25f && Game.LocalPlayer.Character.IsOnFoot && !_hasBegunAttacking) { _V.Tasks.LeaveVehicle(_vV, LeaveVehicleFlags.None); _V.Health = 200; _Cop.Tasks.LeaveVehicle(_vCop, LeaveVehicleFlags.LeaveDoorOpen); GameFiber.Wait(200); new RelationshipGroup("Cop"); new RelationshipGroup("V"); _V.RelationshipGroup = "V"; _Cop.RelationshipGroup = "Cop"; Game.SetRelationshipBetweenRelationshipGroups("Cop", "V", Relationship.Hate); _V.Inventory.GiveNewWeapon("WEAPON_PISTOL", 500, true); _V.Tasks.FightAgainstClosestHatedTarget(1000f); _Cop.Tasks.FightAgainstClosestHatedTarget(1000f); GameFiber.Wait(2000); _V.Tasks.FightAgainst(Game.LocalPlayer.Character); _hasBegunAttacking = true; GameFiber.Wait(600); } if (_Scene2 == true && _Scene3 == false && _Scene1 == false && _Cop.DistanceTo(Game.LocalPlayer.Character) < 25f && Game.LocalPlayer.Character.IsOnFoot && !_notificationDisplayed && !_check) { _Cop.Tasks.LeaveVehicle(_vCop, LeaveVehicleFlags.LeaveDoorOpen); GameFiber.Wait(600); NativeFunction.CallByName <uint>("TASK_AIM_GUN_AT_ENTITY", _Cop, _V, -1, true); Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~w~UnitedCallouts", "", "Perform a traffic stop."); _notificationDisplayed = true; Game.DisplayHelp("Press the ~y~END~w~ key to end the Traffic Stop Backup callout.", 5000); GameFiber.Wait(600); Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~w~UnitedCallouts", "~y~Dispatch", "Loading ~g~Informations~w~ of the ~y~LSPD Database~w~..."); Functions.DisplayVehicleRecord(_vV, true); _check = true; } if (_Scene3 == true && _Scene1 == false && _Scene2 == false && _Cop.DistanceTo(Game.LocalPlayer.Character) < 25f && Game.LocalPlayer.Character.IsOnFoot) { _pursuit = Functions.CreatePursuit(); Functions.AddPedToPursuit(_pursuit, _V); Functions.SetPursuitIsActiveForPlayer(_pursuit, true); _pursuitCreated = true; } } if (Game.LocalPlayer.Character.IsDead) { End(); } if (Game.IsKeyDown(Settings.EndCall)) { End(); } if (_V && _V.IsDead) { End(); } if (_V && Functions.IsPedArrested(_V)) { End(); } }, "Traffic Stop Backup [UnitedCallouts]"); base.Process(); }
public override void Process() { if (playerPed.IsDead) { this.End(); } base.Process(); GameFiber.StartNew(delegate { if (SpawnPoint.DistanceTo(Game.LocalPlayer.Character) < 25f) { if (Scene1 == true && Scene3 == false && Scene2 == false && subject.DistanceTo(Game.LocalPlayer.Character) < 8f && Game.LocalPlayer.Character.IsOnFoot && !notificationDisplayed && !getAmbulance) { Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~w~ExampleCallouts", "~y~Dispatch", "We are going to call a ~y~ambulance~w~ to you're current location, Officer. Press the ~y~END~w~ key to end the welfare check callout."); notificationDisplayed = true; GameFiber.Wait(1000); Game.DisplayHelp("Press the ~y~END~w~ key to end the wellfare check callout. The callout is ~g~ CODE 4~w~."); UltimateBackup.API.Functions.callAmbulance(); getAmbulance = true; } if (Scene2 == true && Scene3 == false && Scene1 == false && SpawnPoint.DistanceTo(Game.LocalPlayer.Character) < 8f && Game.LocalPlayer.Character.IsOnFoot && !notificationDisplayed) { Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~w~ExampleCallouts", "~y~Dispatch", "No one is at home.<br>You are ~g~code 4~w~."); notificationDisplayed = true; GameFiber.Wait(1000); Game.DisplayHelp("Press the ~y~END~w~ key to end the welfare check callout. The callout is ~g~ CODE 4~w~."); } if (Scene3 == true && Scene1 == false && Scene2 == false && subject.DistanceTo(Game.LocalPlayer.Character) < 25f && Game.LocalPlayer.Character.IsOnFoot && alreadySubtitleIntrod == false && pursuit == null) { Game.DisplaySubtitle("Press ~y~Y ~w~to speak with the suspect.", 5000); alreadySubtitleIntrod = true; wasClose = true; } if (Scene3 == true && Scene1 == false && Scene2 == false && subject.DistanceTo(Game.LocalPlayer.Character) < 2f && Game.IsKeyDown(System.Windows.Forms.Keys.Y)) { subject.Face(Game.LocalPlayer.Character); switch (storyLine) { case 1: Game.DisplaySubtitle("~y~Suspect: ~w~Hello Officer, how can I help you? Is everything alright? (1/5)", 5000); storyLine++; break; case 2: Game.DisplaySubtitle("~b~You: ~w~Hello, we got a call for a welfare check, because you didn't response to the call. (2/5)", 5000); storyLine++; break; case 3: Game.DisplaySubtitle("~y~Suspect: ~w~Oh no, I forgot that. (3/5)", 5000); storyLine++; break; case 4: if (callOutMessage == 1) { Game.DisplaySubtitle("~y~Suspect: ~w~I lost my phone today. I can't find it. (4/5)", 5000); } if (callOutMessage == 2) { Game.DisplaySubtitle("~y~Suspect: ~w~The battery of my phone was empty. (4/5)", 5000); } if (callOutMessage == 3) { Game.DisplaySubtitle("~y~Suspect: ~w~Okay, I'll definitely call back now. Thank you! (4/5)", 5000); } storyLine++; break; case 5: if (callOutMessage == 1) { Game.DisplaySubtitle("~b~You: ~w~Hm, that is annoying. We will let the caller know, that everything is alright. (5/5)", 5000); } Game.DisplayHelp("Press the ~y~END~w~ key to end the ~o~welfare check~w~ callout. The callout is ~g~ CODE 4~w~."); if (callOutMessage == 2) { Game.DisplaySubtitle("~b~You: ~w~Okay, everything is alright. If the battery is full now, you can call back. (5/5)", 5000); } Game.DisplayHelp("Press the ~y~END~w~ key to end the ~o~welfare check~w~ callout. The callout is ~g~ CODE 4~w~."); if (callOutMessage == 3) { Game.DisplaySubtitle("~b~You: ~w~Alright, no problem! Have a nice day. (5/5)", 5000); } Game.DisplayHelp("Press the ~y~END~w~ key to end the ~o~welfare check~w~ callout. The callout is ~g~ CODE 4~w~."); storyLine++; break; case 6: if (callOutMessage == 1) { End(); } if (callOutMessage == 2) { End(); } if (callOutMessage == 3) { End(); } storyLine++; break; default: break; } } } }, "WellfareCheck [ExampleCallouts]"); }
public override void Process() { GameFiber.StartNew(delegate { if (_subject.DistanceTo(Game.LocalPlayer.Character) < 20f) { if (_attack == true && _startedPursuit == false) { _subject.Tasks.FightAgainst(Game.LocalPlayer.Character); } if (_attack == false && _subject.DistanceTo(Game.LocalPlayer.Character) < 6f && Game.LocalPlayer.Character.IsOnFoot && _alreadySubtitleIntrod == false) { Game.DisplaySubtitle("Druk op ~y~Y ~w~om de praten met de Onruststoker.", 5000); _subject.Face(Game.LocalPlayer.Character); _alreadySubtitleIntrod = true; _wasClose = true; if (_Blip.Exists()) { _Blip.Delete(); } } if (_subject.DistanceTo(Game.LocalPlayer.Character) < 5f && Game.LocalPlayer.Character.IsOnFoot && _alreadySubtitleIntrod == false) { _subject.Tasks.AchieveHeading(Game.LocalPlayer.Character.Heading); } if (_attack == false && _subject.DistanceTo(Game.LocalPlayer.Character) < 2f && Game.IsKeyDown(Settings.Dialog)) { _subject.Face(Game.LocalPlayer.Character); switch (_storyLine) { case 1: Game.DisplaySubtitle("~r~Onruststoker: ~w~Hallo meneer, is er iets aan de hand? (1/5)", 5000); _storyLine++; break; case 2: Game.DisplaySubtitle("~b~Agent: ~w~Ben jij het persoon die mogelijk onrust veroorzaakt? (2/5)", 5000); _storyLine++; break; case 3: Game.DisplaySubtitle("~r~Onruststoker: ~w~ehm... Nee! (3/5)", 5000); _storyLine++; break; case 4: if (_callOutMessage == 1) { Game.DisplaySubtitle("~b~Agent: ~w~We hebben een fimpje gekregen van iemand die zeer aggresief gedrag vertoont en u matcht de omschrijving. (4/5)", 5000); } if (_callOutMessage == 2) { Game.DisplaySubtitle("~b~Agent: ~w~Oké, maar iemand heeft de politie gebeld tegen iemand die op jou lijkt. (4/5)", 5000); } if (_callOutMessage == 3) { Game.DisplaySubtitle("~b~Agent: ~w~hmm, weet je dat zeker?? (4/5)", 5000); } _storyLine++; break; case 5: if (_callOutMessage == 1) { _subject.Tasks.PutHandsUp(-1, Game.LocalPlayer.Character); Game.DisplaySubtitle("~r~Onruststoker: ~w~Ik geef toe dat ik het gedaan heb. (5/5)", 5000); } if (_callOutMessage == 2) { Game.DisplaySubtitle("~r~Onruststoker: ~w~F**k off! (5/5)", 5000); _subject.Inventory.GiveNewWeapon("WEAPON_KNIFE", 500, true); Rage.Native.NativeFunction.CallByName <uint>("TASK_COMBAT_PED", _subject, Game.LocalPlayer.Character, 0, 16); } if (_callOutMessage == 3) { Game.DisplaySubtitle("~r~Onruststoker: ~w~KLOOTZAK! (5/5)", 5000); _subject.Inventory.GiveNewWeapon("WEAPON_MOLOTOV", 500, true); Rage.Native.NativeFunction.CallByName <uint>("TASK_COMBAT_PED", _subject, Game.LocalPlayer.Character, 0, 16); } _storyLine++; break; default: break; } } } if (Game.LocalPlayer.Character.IsDead) { End(); } if (Game.IsKeyDown(Settings.EndCall)) { End(); } if (_subject.IsDead) { End(); } if (Functions.IsPedArrested(_subject)) { End(); } }, "Onruststoker [DutchCallouts]"); base.Process(); }
public override void Process() { GameFiber.StartNew(delegate { if (_SpawnPoint.DistanceTo(Game.LocalPlayer.Character) < 25f) { if (_Scene1 == true && _Scene3 == false && _Scene2 == false && _Cop.DistanceTo(Game.LocalPlayer.Character) < 25f && Game.LocalPlayer.Character.IsOnFoot && !_hasBegunAttacking) { _V.Tasks.LeaveVehicle(_vV, LeaveVehicleFlags.None); _V.Health = 200; _Cop.Tasks.LeaveVehicle(_vCop, LeaveVehicleFlags.LeaveDoorOpen); GameFiber.Wait(200); new RelationshipGroup("Cop"); new RelationshipGroup("V"); _V.RelationshipGroup = "V"; _Cop.RelationshipGroup = "Cop"; Game.SetRelationshipBetweenRelationshipGroups("Cop", "V", Relationship.Hate); _V.Inventory.GiveNewWeapon("WEAPON_PISTOL", 500, true); _V.Tasks.FightAgainstClosestHatedTarget(1000f); _Cop.Tasks.FightAgainstClosestHatedTarget(1000f); GameFiber.Wait(2000); _V.Tasks.FightAgainst(Game.LocalPlayer.Character); _hasBegunAttacking = true; GameFiber.Wait(600); } if (_Scene2 == true && _Scene3 == false && _Scene1 == false && _Cop.DistanceTo(Game.LocalPlayer.Character) < 25f && Game.LocalPlayer.Character.IsOnFoot && !_notificationDisplayed && !_check) { _Cop.Tasks.LeaveVehicle(_vCop, LeaveVehicleFlags.LeaveDoorOpen); GameFiber.Wait(600); NativeFunction.CallByName <uint>("TASK_AIM_GUN_AT_ENTITY", _Cop, _V, -1, true); Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~w~DutchCallouts", "~y~Meldkamer", "Doe een normale aanhouding."); _notificationDisplayed = true; Game.DisplayHelp("Druk op ~y~END~w~ om de callout te stoppen."); GameFiber.Wait(600); Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~w~DutchCallouts", "~y~Meldkamer", "~g~Informaties~w~ laden uit de ~y~LSPD Database~w~..."); Functions.DisplayVehicleRecord(_vV, true); _check = true; } if (_Scene3 == true && _Scene1 == false && _Scene2 == false && _Cop.DistanceTo(Game.LocalPlayer.Character) < 25f && Game.LocalPlayer.Character.IsOnFoot) { _pursuit = Functions.CreatePursuit(); Functions.AddPedToPursuit(_pursuit, _V); Functions.SetPursuitIsActiveForPlayer(_pursuit, true); _pursuitCreated = true; } } if (Game.LocalPlayer.Character.IsDead) { End(); } if (Game.IsKeyDown(Settings.EndCall)) { End(); } if (_V.IsDead || !_V.Exists() || Functions.IsPedArrested(_V)) { End(); } }, "Voertuig Aanhouding Assistentie [DutchCallouts]"); base.Process(); }
public override void Process() { base.Process(); GameFiber.StartNew(delegate { if (suspect.Exists() && spawnPoint.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) < 40f) { suspect.KeepTasks = true; if (suspectBlip.Exists() && !notificationShown) { suspectBlip.Delete(); } GameFiber.Wait(2000); if (!lostVehicleBlipped) { lostVehicleBlip = lostVehicle.AttachBlip(); lostVehicleBlip.Color = Color.Green; lostVehicleBlipped = true; } if (!notificationShown) { Game.DisplayHelp("Press " + Initialization.dialogueKey.ToString() + " to show dialogues."); } if (decision < 4 && witnessThere && !notificationShown) { notificationShown = true; Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~y~FireyCallouts", "~b~Dispatch", "~w~" + notificationTexts[decision][selector]); GameFiber.Wait(2000); if (selector == 0) { // Witness has information witnessBlip = witness.AttachBlip(); witnessBlip.Color = Color.Green; witnessBlip.EnableRoute(Color.Green); storyDecisionWitness = 3; dialoguesWitness[storyDecisionWitness][4] = "I've noticed the license plate of the vehicle. It is ~g~" + suspectVehicle.LicensePlate + "~w~."; witnessInfo = true; } else { Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~y~FireyCallouts", "~b~Dispatch", "~w~We are looking for a truck with license plate ~g~" + suspectVehicle.LicensePlate + "~w~. We will update you with the latest known positions."); witnessBlip = witness.AttachBlip(); witnessBlip.Color = Color.Green; updateLocations = true; } notificationShown = true; } else if (decision < 4 && !witnessThere && !notificationShown) { notificationShown = true; Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~y~FireyCallouts", "~b~Dispatch", "~w~" + notificationTexts[1][selector]); GameFiber.Wait(2000); if (selector == 1) { Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~y~FireyCallouts", "~b~Dispatch", "~w~We are looking for a truck with license plate ~g~" + suspectVehicle.LicensePlate + "~w~. We will update you with the latest known positions."); updateLocations = true; } notificationShown = true; } else { notificationShown = true; } } if (suspect.Exists() && suspect.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) < 8f && !suspectDialogueComplete && (!witness.Exists() || witness.Exists() && witness.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) > suspect.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)))) { // Story driver (suspect) if (Game.IsKeyDown(Initialization.dialogueKey) && !suspectDialogueComplete && decision >= 2) { if (decision < 4) { Game.DisplaySubtitle(dialoguesSuspect[storyRunaway][dialogueCountSuspect]); dialogueCountSuspect++; GameFiber.Wait(1000); if (dialogueCountSuspect >= dialoguesSuspect[storyRunaway].Length) { suspectDialogueComplete = true; } } else { Game.DisplaySubtitle(dialoguesSuspect[storyDecisionSuspect][dialogueCountSuspect]); dialogueCountSuspect++; GameFiber.Wait(1000); if (dialogueCountSuspect >= dialoguesSuspect[storyDecisionSuspect].Length) { suspectDialogueComplete = true; } } } else { if (decision < 2) { suspectDialogueComplete = true; } } } else if (witness.Exists() && witness.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) < 8f && !witnessDialogueComplete && notificationShown && (!suspect.Exists() || suspect.Exists() && witness.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) < suspect.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)))) { // Story witness if (Game.IsKeyDown(Initialization.dialogueKey) && !witnessDialogueComplete) { Game.DisplaySubtitle(dialoguesWitness[storyDecisionWitness][dialogueCountWitness]); dialogueCountWitness++; Game.LogTrivial("[FireyCallouts][Debug-log] Dialogue Counter: " + dialogueCountWitness.ToString() + " Dialogue: " + dialoguesWitness[storyDecisionWitness][dialogueCountWitness]); GameFiber.Wait(1000); if (dialogueCountWitness >= dialoguesWitness[storyDecisionWitness].Length) { witnessDialogueComplete = true; if (witness.Exists()) { witness.Dismiss(); } if (witnessBlip.Exists()) { witnessBlip.Delete(); } GameFiber.Wait(3000); if (witnessInfo) { Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~y~FireyCallouts", "~b~Dispatch", "~w~We have located the vehicle. Stop them."); updateLocations = true; GameFiber.Wait(1500); } } } } if (suspect.Exists() && updateLocations && !pursuitCreated && suspect.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) > 40f && !timeBuffer) { timeBuffer = true; if (suspectBlip.Exists()) { suspectBlip.Delete(); } suspectBlip = new Blip(suspect.Position, 60f) { Color = Color.Yellow }; suspectBlip.EnableRoute(Color.Yellow); if (decision >= 2 && decision < 4) { GameFiber.Wait(10000); } GameFiber.Wait(5000); timeBuffer = false; } if (suspect.Exists() && suspect.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) < 20f && decision < 2 && notificationShown && !pursuitCreated) { pursuit = Functions.CreatePursuit(); Functions.AddPedToPursuit(pursuit, suspect); Functions.SetPursuitIsActiveForPlayer(pursuit, true); pursuitCreated = true; Game.LogTrivial("[FireyCalouts][Debug-log] Pursuit started"); updateLocations = false; if (suspectBlip.Exists()) { suspectBlip.Delete(); } } else if (suspect.Exists() && suspect.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) < 20f && notificationShown) { updateLocations = false; if (suspectBlip.Exists()) { suspectBlip.Delete(); } } if (Game.LocalPlayer.Character.IsDead) { End(); } if (Game.IsKeyDown(Initialization.endKey)) { End(); } if (suspect.Exists()) { if (suspect.IsDead) { End(); } } if (suspect.Exists()) { if (Functions.IsPedArrested(suspect)) { End(); } } }, "LostFreight [FireyCallouts]"); }
public override void Process() { GameFiber.StartNew(delegate { if (_subject.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) < 40f) { if (_Blip.Exists()) { _Blip.Delete(); } } if (_subject.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) < 70f && !_isArmed) { _subject.Inventory.GiveNewWeapon(new WeaponAsset(wepList[new Random().Next((int)wepList.Length)]), 500, true); _isArmed = true; } if (_subject.Exists() && _subject.DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront)) < 40f && !_hasBegunAttacking) { if (_scenario > 40) { new RelationshipGroup("AG"); new RelationshipGroup("VI"); _subject.RelationshipGroup = "AG"; _V1.RelationshipGroup = "VI"; _V2.RelationshipGroup = "VI"; _V3.RelationshipGroup = "VI"; _subject.KeepTasks = true; Game.SetRelationshipBetweenRelationshipGroups("AG", "VI", Relationship.Hate); _subject.Tasks.FightAgainstClosestHatedTarget(1000f); Game.DisplayNotification("~b~Dispatch: ~o~Shots Fired~w~ in the near of your postion!"); GameFiber.Wait(2000); _subject.Tasks.FightAgainst(Game.LocalPlayer.Character); _hasBegunAttacking = true; GameFiber.Wait(600); } else { if (!_hasPursuitBegun) { _subject.Face(Game.LocalPlayer.Character); _subject.Tasks.PutHandsUp(-1, Game.LocalPlayer.Character); Game.DisplayNotification("~b~Dispatch:~w~ The person is surrendering. Try to ~o~arrest the person~w~."); _hasPursuitBegun = true; } } } if (Game.LocalPlayer.Character.IsDead) { End(); } if (Game.IsKeyDown(Settings.EndCall)) { End(); } if (_subject.IsDead) { End(); } if (Functions.IsPedArrested(_subject)) { End(); } }, "ShotsFired [UnitedCallouts]"); base.Process(); }
public override void Process() { GameFiber.StartNew(delegate { if (_SpawnPoint.DistanceTo(Game.LocalPlayer.Character) < 25f) { if (_Scene1 == true && _subject && _subject.DistanceTo(Game.LocalPlayer.Character) < 10f && Game.LocalPlayer.Character.IsOnFoot && !_notificationDisplayed && !_getAmbulance) { Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~w~UnitedCallouts", "~y~Dispatch", "We are going to call an ~y~ambulance~w~ to your current location, officer. Press the ~y~END~w~ key to end the welfare check callout."); _notificationDisplayed = true; GameFiber.Wait(1000); if (Settings.HelpMessages) { Game.DisplayHelp("Press the ~y~" + Settings.EndCall + "~w~ key to end the wellfare check callout."); } Functions.RequestBackup(Game.LocalPlayer.Character.Position, LSPD_First_Response.EBackupResponseType.Code3, LSPD_First_Response.EBackupUnitType.Ambulance); _getAmbulance = true; } if (_Scene2 == true && _SpawnPoint.DistanceTo(Game.LocalPlayer.Character) < 8f && Game.LocalPlayer.Character.IsOnFoot && !_notificationDisplayed) { Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~w~UnitedCallouts", "~y~Dispatch", "Investigate the area. If you don't find anyone here, then ~g~End~w~ the callout."); _notificationDisplayed = true; } if (_Scene3 == true && _subject && _subject.DistanceTo(Game.LocalPlayer.Character) < 25f && Game.LocalPlayer.Character.IsOnFoot && _alreadySubtitleIntrod == false) { Game.DisplaySubtitle("Press ~y~Y ~w~to speak with the suspect.", 5000); Game.DisplayHelp("Press the ~y~END~w~ key to end the ~o~welfare check~w~ callout.", 5000); Functions.PlayScannerAudio("ATTENTION_THIS_IS_DISPATCH_HIGH OFFICERS_ARRIVED_ON_SCENE"); _alreadySubtitleIntrod = true; _wasClose = true; } if (_Scene3 == true && _Scene1 == false && _Scene2 == false && _subject.DistanceTo(Game.LocalPlayer.Character) < 2f && Game.IsKeyDown(Settings.Dialog)) { _subject.Face(Game.LocalPlayer.Character); switch (_storyLine) { case 1: Game.DisplaySubtitle("~y~Suspect: ~w~Hello Officer, how can I help you? Is everything alright? (1/5)", 5000); _storyLine++; break; case 2: Game.DisplaySubtitle("~b~You: ~w~Hi. I'm just checking in on this address as we've had a welfare check request come through. Apparently you weren't answering your phone and someone is concerned. Is everything okay here? (2/5)", 5000); _storyLine++; break; case 3: Game.DisplaySubtitle("~y~Suspect: ~w~Oh dear! I didn't want to worry anyone. (3/5)", 5000); _storyLine++; break; case 4: if (_callOutMessage == 1) { Game.DisplaySubtitle("~y~Suspect: ~w~I lost my phone on the bus today, I was actually just about to head to a payphone to ring the bus depot. (4/5)", 5000); } if (_callOutMessage == 2) { Game.DisplaySubtitle("~y~Suspect: ~w~My phone battery died because I forgot to charge it earlier! I did see a missed call but didn't think anything of it. (4/5)", 5000); } if (_callOutMessage == 3) { Game.DisplaySubtitle("~y~Suspect: ~w~Let me check... Oops, I had my phone on silent! I'll call them back now. Sorry to cause such trouble! (4/5)", 5000); } _storyLine++; break; case 5: if (_callOutMessage == 1) { Game.DisplaySubtitle("~b~You: ~w~Ouch. I'll let dispatch know everything is okay. Good luck finding your phone! (5/5)", 5000); } if (_callOutMessage == 2) { Game.DisplaySubtitle("~b~You: ~w~Alright, well as long as everything here is okay, I can leave. You should return that phone call though, the caller was really worried. (5/5)", 5000); } if (_callOutMessage == 3) { Game.DisplaySubtitle("~b~You: ~w~No problem, I'm just glad you're okay. I'll let dispatch know everything is fine here. (5/5)", 5000); } _storyLine++; break; case 6: if (_callOutMessage == 1) { End(); } if (_callOutMessage == 2) { End(); } if (_callOutMessage == 3) { End(); } _storyLine++; break; default: break; } } } if (Game.IsKeyDown(Settings.EndCall)) { End(); } if (Game.LocalPlayer.Character.IsDead) { End(); } }, "WellfareCheck [UnitedCallouts]"); base.Process(); }