protected override void Process() { if (Game.LocalPlayer.Character.Position.DistanceTo(_oneSpawn.Spawn) > 150f) { return; } if (!_one) { _one = new Ped(_pData.Model, _oneSpawn.Spawn, _oneSpawn.Heading); _one.MakeMissionPed(); ScenarioHelper(); } if (Game.LocalPlayer.Character.Position.DistanceTo(_oneSpawn.Spawn) < 6f && _beginDialogue == false) { "Beginning Dialog".AddLog(); _beginDialogue = true; _one.Tasks.Clear(); GameFiber.Sleep(0500); _one.Face(Game.LocalPlayer.Character); Game.DisplayHelp("Press ~y~Y~w~ to start the interrogation"); } if (Game.IsKeyDown(Keys.Y) && !_interrStarted) { if (_areaBlip.Exists()) { _areaBlip.Delete(); } _one.Face(Game.LocalPlayer.Character); GameFiber.Sleep(0500); if (Vector3.Distance2D(Game.LocalPlayer.Character.Position, _one.Position) < 1.5f) { Game.LocalPlayer.Character.Position = Game.LocalPlayer.Character.RearPosition; } _interrogation = new Interrogation(InterrogationCreator.InterrogationLineCreator(InterrogationCreator.Type.VictimFamily, _one), _one); _interrogation.StartDialog(); _interrStarted = true; _interrStarted = true; } if (_interrStarted && Game.LocalPlayer.Character.Position.DistanceTo(_one.Position) > 50f) { _vfData = new ReportData(ReportData.Service.VicFamily, _one, _interrogation.InterrgoationText); this.Attributes.NextScripts.Clear(); this.Attributes.NextScripts.Add("Sa_3b_Wait"); SetScriptFinished(); } }
/// <summary> /// Test environment. /// </summary> public static void Main() { PedModels.BuildLookupDictionary(); while (true) { foreach (KeyValuePair <string, PedModelMeta> modelMeta in PedModels.PedModelMetaLookup) { Ped demoPed = new Ped(modelMeta.Key, Game.LocalPlayer.Character.GetOffsetPositionFront(1.5f), 0f); demoPed.Face(Game.LocalPlayer.Character); Game.DisplayNotification($"{demoPed.Model.Name}: {PedModels.GetTextDescription(demoPed, PedDescriptionPropertyType.Build | PedDescriptionPropertyType.Clothing | PedDescriptionPropertyType.Extras | PedDescriptionPropertyType.Hair | PedDescriptionPropertyType.RaceSex)}"); GameFiber.Sleep(8000); if (demoPed) { demoPed.Delete(); } } GameFiber.Yield(); } }
public override bool OnCalloutAccepted() { Game.LogTrivial("UnitedCallouts Log: store callout accepted."); Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~w~UnitedCallouts", "~y~Store Robbery", "~b~Dispatch:~w~ Someone called the police, because of a store robbery. Respond with ~r~Code 3~w~."); _V.IsPersistent = true; _V.BlockPermanentEvents = true; _A1.IsPersistent = true; _A1.BlockPermanentEvents = true; _A1.Armor = 200; _A1.Inventory.GiveNewWeapon(new WeaponAsset(wepList[new Random().Next((int)wepList.Length)]), 500, true); _A1.Face(_V); _A2.IsPersistent = true; _A2.BlockPermanentEvents = true; _A2.Armor = 200; _A2.Inventory.GiveNewWeapon(new WeaponAsset(wepList[new Random().Next((int)wepList.Length)]), 500, true); _A2.Face(_V); _searcharea = _SpawnPoint.Around2D(1f, 2f); _Blip = new Blip(_searcharea, 20f); _Blip.EnableRoute(Color.Yellow); _Blip.Color = Color.Yellow; _Blip.Alpha = 2f; NativeFunction.CallByName <uint>("TASK_AIM_GUN_AT_ENTITY", _A1, _V, -1, true); NativeFunction.CallByName <uint>("TASK_AIM_GUN_AT_ENTITY", _A2, _V, -1, true); return(base.OnCalloutAccepted()); }
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("Arresteer de ~o~koper~w~!"); _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.IsDead && _Victim.IsDead) { End(); } if (Functions.IsPedArrested(_Dealer) && Functions.IsPedArrested(_Victim)) { End(); } }, "Drug [DutchCallouts]"); base.Process(); }
public override bool OnCalloutAccepted() { Game.LogTrivial("UnitedCallouts Log: store callout accepted."); Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~w~UnitedCallouts", "~y~Store Robbery", "~b~Dispatch:~w~ Someone called the police because of a store robbery. Respond with ~r~Code 3~w~."); _V.IsPersistent = true; _V.BlockPermanentEvents = true; _A1.IsPersistent = true; _A1.BlockPermanentEvents = true; _A1.Armor = 200; _A1.Inventory.GiveNewWeapon(new WeaponAsset(wepList[new Random().Next((int)wepList.Length)]), 500, true); _A1.Face(_V); _A2.IsPersistent = true; _A2.BlockPermanentEvents = true; _A2.Armor = 200; _A2.Inventory.GiveNewWeapon(new WeaponAsset(wepList[new Random().Next((int)wepList.Length)]), 500, true); _A2.Face(_V); _searcharea = _SpawnPoint.Around2D(1f, 2f); _Blip = new Blip(_searcharea, 20f); _Blip.EnableRoute(Color.Yellow); _Blip.Color = Color.Yellow; _Blip.Alpha = 0.5f; NativeFunction.CallByName <uint>("TASK_AIM_GUN_AT_ENTITY", _A1, _V, -1, true); NativeFunction.CallByName <uint>("TASK_AIM_GUN_AT_ENTITY", _A2, _V, -1, true); new RelationshipGroup("A"); new RelationshipGroup("V"); _V.RelationshipGroup = "V"; _A1.RelationshipGroup = "A"; _A2.RelationshipGroup = "A"; _V.Tasks.PutHandsUp(-1, _A1); Game.LocalPlayer.Character.RelationshipGroup = "V"; Game.SetRelationshipBetweenRelationshipGroups("A", "V", Relationship.Hate); Game.SetRelationshipBetweenRelationshipGroups("V", "A", Relationship.Hate); if (Settings.ActivateAIBackup) { Functions.RequestBackup(_SpawnPoint, LSPD_First_Response.EBackupResponseType.Pursuit, LSPD_First_Response.EBackupUnitType.LocalUnit); Functions.RequestBackup(_SpawnPoint, LSPD_First_Response.EBackupResponseType.Pursuit, LSPD_First_Response.EBackupUnitType.LocalUnit); } return(base.OnCalloutAccepted()); }
protected override void Process() { if (Game.LocalPlayer.Character.Position.DistanceTo(_oneSpawn.Spawn) > 150f) { return; } if (!_one) { _one = new Ped(_sData.Model, _oneSpawn.Spawn, _oneSpawn.Heading); _one.MakeMissionPed(); _one.ResetVariation(); _one.Heading = _oneSpawn.Heading; GameFiber.StartNew(delegate { "_one.Task.Start".AddLog(); while (Game.LocalPlayer.Character.Position.DistanceTo(_one) > 5f) { _one.Task_Scenario(_scenario); while (NativeFunction.Natives.IS_PED_USING_ANY_SCENARIO <bool>(_one)) { GameFiber.Yield(); } GameFiber.Yield(); } NativeFunction.Natives.TASK_TURN_PED_TO_FACE_ENTITY(_one, Game.LocalPlayer.Character, -1); }); } if (Game.LocalPlayer.Character.Position.DistanceTo(_oneSpawn.Spawn) < 10f && !_notified) { _notified = true; Game.DisplayHelp("While you don't have enough information to arrest the ~r~suspect~w~ nothing is stopping you from have a conversation!"); _one.Tasks.Clear(); GameFiber.Sleep(1000); _one.Face(Game.LocalPlayer.Character); } if (Game.LocalPlayer.Character.Position.DistanceTo(_oneSpawn.Spawn) < 3f && !_beginDialogue) { _beginDialogue = true; if (_areaBlip.Exists()) { _areaBlip.Delete(); } Game.DisplayHelp("Press ~y~Y~w~ to ask the ~r~suspect~w~ some questions."); } if (Game.IsKeyDown(Keys.Y) && !_interrStarted) { _one.Tasks.ClearImmediately(); GameFiber.Sleep(0500); _one.Face(Game.LocalPlayer.Character); GameFiber.Sleep(1000); _interrogation = new Interrogation(InterrogationCreator.InterrogationLineCreator(InterrogationCreator.Type.Suspect, _one), _one); _interrogation.StartDialog(); _interrStarted = true; } if (_interrStarted && _interrogation.HasEnded && !_leaveNotified) { _sReportData = new ReportData(ReportData.Service.SusFamily, _one, _interrogation.InterrgoationText); _leaveNotified = true; Game.DisplayHelp("It looks like the ~r~suspect~w~ is done talking, leave the scene before you lose the case"); StartTimer(); } if (_interrStarted && Game.LocalPlayer.Character.DistanceTo(_one) > 20f) { if (!_interrogation.HasEnded) { return; } var value = _interrogation.QuestionList.Where(q => q.Value == false) .Aggregate(100, (current, q) => current - 15); var medal = MissionPassedScreen.Medal.Gold; if (value >= 80 && value < 100) { medal = MissionPassedScreen.Medal.Silver; } else if (value < 80) { medal = MissionPassedScreen.Medal.Bronze; } var handler = new MissionPassedHandler("Suspect Interrogation", value, medal); handler.AddItem("Spoke to Suspect", "", MissionPassedScreen.TickboxState.Tick); var num = 0; foreach (var q in _interrogation.QuestionList) { num++; var correct = q.Value ? "Correct" : "Incorrect"; handler.AddItem($"Question {num}", correct, MissionPassedScreen.TickboxState.None); } handler.Show(); SetScriptFinished(); } }
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) < 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 (_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(); }
public override void Process() { GameFiber.StartNew(delegate { if (_subject.DistanceTo(Game.LocalPlayer.Character) < 20f) { 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?", 5000); storyLine++; break; case 2: Game.DisplaySubtitle("~b~You: ~w~We have an arrest warrant against you.", 5000); storyLine++; break; case 3: Game.DisplaySubtitle("~y~Suspect: ~w~...me? Are you sure?", 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.", 5000); } if (_callOutMessage == 2) { Game.DisplaySubtitle("~b~You: ~w~I have to arrest you, because we have an arrest warrant against you.", 5000); } if (_callOutMessage == 3) { Game.DisplaySubtitle("~b~You: ~w~I have to arrest you, because we have an arrest warrant against you.", 5000); } storyLine++; break; case 5: if (_callOutMessage == 1) { _subject.Tasks.PutHandsUp(-1, Game.LocalPlayer.Character); Game.DisplaySubtitle("~y~Suspect: ~w~Okay okay, I did something terrible. Arrest me!", 5000); } if (_callOutMessage == 2) { Game.DisplaySubtitle("~y~Suspect: ~w~Please don't arrest me!", 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 have not done anything.", 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.IsDead) { End(); } if (Functions.IsPedArrested(_subject)) { End(); } }, "ArrestWarrant [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() { 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() { 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() { 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("Press ~y~Y ~w~to speak with the troublemaker.", 5000); _subject.Face(Game.LocalPlayer.Character); _alreadySubtitleIntrod = true; _wasClose = true; if (_Blip) { _Blip.Delete(); } } if (_subject.DistanceTo(Game.LocalPlayer.Character) < 5f && Game.LocalPlayer.Character.IsOnFoot && _alreadySubtitleIntrod == false) { _subject.Face(Game.LocalPlayer.Character); } if (_attack == false && _subject.DistanceTo(Game.LocalPlayer.Character) < 2f && Game.IsKeyDown(Settings.Dialog)) { _subject.Face(Game.LocalPlayer.Character); switch (_storyLine) { case 1: if (_callOutMessage == 1) { Game.DisplaySubtitle("~r~Troublemaker: ~w~Hello officer, is there a problem? (1/5)", 5000); } if (_callOutMessage == 2) { Game.DisplaySubtitle("~r~Troublemaker: ~w~What do you want? (1/5)", 5000); } if (_callOutMessage == 3) { Game.DisplaySubtitle("~r~Troublemaker: ~w~I'm not drunk! (1/5)", 5000); } _storyLine++; break; case 2: if (_callOutMessage == 1) { Game.DisplaySubtitle("~b~You: ~w~We've had some reports of a male matching your description causing a disturbance here. (2/5)", 5000); } if (_callOutMessage == 2) { Game.DisplaySubtitle("~b~You: ~w~Alright, let's stay calm. What are you doing here? (2/5)", 5000); } if (_callOutMessage == 3) { Game.DisplaySubtitle("~b~You: ~w~Sure. We've had reports of an intoxicated individual harassing members of the public. That wouldn't be you, would it? (2/5)", 5000); } _storyLine++; break; case 3: if (_callOutMessage == 1) { Game.DisplaySubtitle("~r~Troublemaker: ~w~Okay, I may have had an argument down by the tracks. I just lost my temper, I'm sorry! (3/5)", 5000); } if (_callOutMessage == 2) { Game.DisplaySubtitle("~r~Troublemaker: ~w~What do you care? I'm not doing anything wrong. Leave me alone. (3/5)", 5000); } if (_callOutMessage == 3) { Game.DisplaySubtitle("~r~Troublemaker: ~w~Harassing? Please, I was trying to get the hobo down there to leave the area. I was doing your job! (3/5)", 5000); } _storyLine++; break; case 4: if (_callOutMessage == 1) { Game.DisplaySubtitle("~b~You: ~w~Alright, well you need to leave the area so that I know there won't be any further issues. (4/5)", 5000); } if (_callOutMessage == 2) { Game.DisplaySubtitle("~b~You: ~w~We've had reports of someone using vulgar and offensive language. (4/5)", 5000); } if (_callOutMessage == 3) { Game.DisplaySubtitle("~b~You: ~w~Alright, well let us deal with that. Please leave the area, you're making people uncomfortable and being a nuisance. (4/5)", 5000); } _storyLine++; break; case 5: if (_callOutMessage == 1) { _subject.Tasks.PutHandsUp(-1, Game.LocalPlayer.Character); Game.DisplaySubtitle("~r~Troublemaker: ~w~Of course, I'm sorry. I'll wait for my friend elsewhere. (5/5)", 5000); } if (_callOutMessage == 2) { Game.DisplaySubtitle("~r~Troublemaker: ~w~What the f**k has happened to this country? I have free speech you bitch! You can't silence me! (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~Oh am I? Well how about now?! (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 && _subject.IsDead) { End(); } if (_subject && Functions.IsPedArrested(_subject)) { End(); } }, "Troublemaker [UnitedCallouts]"); base.Process(); }
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 (_Cop1.DistanceTo(Game.LocalPlayer.Character) < 25f && Game.LocalPlayer.Character.IsOnFoot && !Noticed) { Game.DisplaySubtitle("Press ~y~Y~w~ to speak with the officer.", 5000); Functions.PlayScannerAudio("ATTENTION_GENERIC_01 OFFICERS_ARRIVED_ON_SCENE"); _Cop1.Face(Game.LocalPlayer.Character); if (SpawnLocationBlip) { SpawnLocationBlip.Delete(); } Noticed = true; } if (_Murder.DistanceTo(Game.LocalPlayer.Character) < 25f & !Noticed) { if (MurderLocationBlip) { MurderLocationBlip.Delete(); } Noticed = true; if (_Scene1 == true && _Scene2 == false) { _DeadPerson2.Kill(); _Murder.Tasks.FightAgainst(Game.LocalPlayer.Character); } if (_Scene2 == true && _Scene1 == false) { new RelationshipGroup("AG"); new RelationshipGroup("VI"); _Murder.RelationshipGroup = "AG"; _DeadPerson2.RelationshipGroup = "VI"; Game.SetRelationshipBetweenRelationshipGroups("AG", "VI", Relationship.Hate); _Murder.Tasks.FightAgainstClosestHatedTarget(1000f); GameFiber.Wait(300); _Murder.Tasks.FightAgainst(Game.LocalPlayer.Character); } } if (_Cop1.DistanceTo(Game.LocalPlayer.Character) < 2f && Game.IsKeyDown(Settings.Dialog)) { _Cop1.Face(Game.LocalPlayer.Character); switch (storyLine) { case 1: Game.DisplaySubtitle("~y~Officer: ~w~Hello Detective, we called you because we have a dead body here. (1/5)", 5000); storyLine++; break; case 2: Game.DisplaySubtitle("~b~You: ~w~Do we have anything about the murder? (2/5)", 5000); storyLine++; break; case 3: Game.DisplaySubtitle("~y~Officer: ~w~Yes, we have found something of interest. (3/5)", 5000); storyLine++; break; case 4: if (_callOutMessage == 1) { Game.DisplaySubtitle("~y~Officer: ~w~We checked the cameras around here and there was a man without a mask, so our police department checked the identity. (4/5)", 5000); } if (_callOutMessage == 2) { Game.DisplaySubtitle("~y~Officer: ~w~As the coroner searched the killed person, they found an ID next to the person. (4/5)", 5000); } storyLine++; break; case 5: if (_callOutMessage == 1) { Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~w~UnitedCallouts", "~y~Police Department", "The police department found personal details of the murder:<br>~w~Name: ~b~" + LSPD_First_Response.Engine.Scripting.Entities.Persona.FromExistingPed(_Murder).FullName + "<br>~w~Gender: ~g~" + LSPD_First_Response.Engine.Scripting.Entities.Persona.FromExistingPed(_Murder).Gender + "<br>~w~DOB: ~y~" + LSPD_First_Response.Engine.Scripting.Entities.Persona.FromExistingPed(_Murder).Birthday.Date + ""); } if (_callOutMessage == 2) { Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~w~UnitedCallouts", "~y~Police Department", "The police department found personal details of the murder:<br>~w~Name: ~b~" + LSPD_First_Response.Engine.Scripting.Entities.Persona.FromExistingPed(_Murder).FullName + "<br>~w~Gender: ~g~" + LSPD_First_Response.Engine.Scripting.Entities.Persona.FromExistingPed(_Murder).Gender + "<br>~w~DOB: ~y~" + LSPD_First_Response.Engine.Scripting.Entities.Persona.FromExistingPed(_Murder).Birthday.Date + ""); } storyLine++; break; case 6: if (_callOutMessage == 1) { Game.DisplaySubtitle("~b~You: ~w~Alright, I'll check the house of the murder. Thank you for your time, officer! (5/5)", 5000); } if (_callOutMessage == 2) { Game.DisplaySubtitle("~b~You: ~w~Okay, thank you for letting me know! I'll find the murder! (5/5)", 5000); } storyLine++; Game.DisplayHelp("The ~y~Police Department~w~ is setting up the location on your GPS...", 5000); GameFiber.Wait(3000); Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~w~UnitedCallouts", "~y~Police Department", "~b~Detective~w~, we ~o~marked the apartment~w~ for you on the map. Search the ~y~yellow circle area~w~ on your map and try to ~y~find~w~ and ~b~arrest~w~ the ~g~murder~w~."); _searcharea = _MurderLocation.Around2D(1f, 2f); MurderLocationBlip = new Blip(_searcharea, 40f); MurderLocationBlip.EnableRoute(Color.Yellow); MurderLocationBlip.Color = Color.Yellow; MurderLocationBlip.Alpha = 0.5f; break; default: break; } } if (Game.IsKeyDown(Settings.EndCall)) { End(); } if (Game.LocalPlayer.Character.IsDead) { End(); } if (_Murder && _Murder.IsDead) { End(); } if (_Murder && Functions.IsPedArrested(_Murder)) { End(); } }, "Murder Investigation [UnitedCallouts]"); base.Process(); }
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 (_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); Functions.PlayScannerAudio("ATTENTION_GENERIC_01 OFFICERS_ARRIVED_ON_SCENE"); _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? (1/5)", 5000); _storyLine++; break; case 2: Game.DisplaySubtitle("~b~You: ~w~Are you the owner? (2/5)", 5000); _storyLine++; break; case 3: Game.DisplaySubtitle("~y~Suspect: ~w~Ah...yes I am the owner! Is anything wrong? (3/5)", 5000); _storyLine++; break; case 4: if (_callOutMessage == 1) { Game.DisplaySubtitle("~b~You: ~w~Is there a reason you have a police vehicle in your garage? (4/5)", 5000); } if (_callOutMessage == 2) { Game.DisplaySubtitle("~b~You: ~w~That's a police vehicle... what's going on here? (4/5)", 5000); } if (_callOutMessage == 3) { Game.DisplaySubtitle("~b~You: ~w~I couldn't help but notice that police vehicle. Care to explain? (4/5)", 5000); } _storyLine++; break; case 5: if (_callOutMessage == 1) { Game.DisplaySubtitle("~y~Suspect: ~w~Uh... Yes! It's here because... Ah, forget it. Do what you need to do. (5/5)", 5000); } Game.DisplayNotification("web_lossantospolicedept", "web_lossantospolicedept", "~w~UnitedCallouts", "~y~Dispatch Information", "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~You weren't meant to see this! (5/5)", 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~I could, but there's no point in talking to a corpse! (5/5)", 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 && _Seller.IsDead && _Buyer.Exists() && _Buyer.IsDead) { End(); } if (_Seller && Functions.IsPedArrested(_Seller) && _Buyer.Exists() && Functions.IsPedArrested(_Buyer)) { End(); } }, "CarTrade [UnitedCallouts]"); base.Process(); }
public override bool OnBeforeCalloutDisplayed() { _Location1 = new Vector3(-10.93565f, -1434.329f, 31.11683f); _Location2 = new Vector3(-1.838376f, 523.2645f, 174.6274f); _Location3 = new Vector3(-801.5516f, 178.7447f, 72.83471f); _Location4 = new Vector3(-801.5516f, 178.7447f, 72.83471f); _Location5 = new Vector3(-812.7239f, 178.7438f, 76.74079f); _Location6 = new Vector3(3.542758f, 526.8926f, 170.6218f); _Location7 = new Vector3(-1155.698f, -1519.297f, 10.63272f); _Location8 = new Vector3(1392.589f, 3613.899f, 38.94194f); _Location9 = new Vector3(2435.457f, 4966.514f, 46.8106f); _DeadPersonSpawn = new Vector3(1162.029f, 2371.788f, 57.66312f); _Cop1Spawn = new Vector3(1174.725f, 2369.399f, 57.59957f); _Cop2Spawn = new Vector3(1167.733f, 2382.189f, 57.61982f); _Coroner1Spawn = new Vector3(1161.486f, 2369.885f, 57.76299f); _Coroner2Spawn = new Vector3(1165.3f, 2374.227f, 57.63049f); _CopVSpawn = new Vector3(1174.684f, 2375.117f, 57.6276f); _CoronerVSpawn = new Vector3(1165.686f, 2360.025f, 57.62796f); Random random = new Random(); List <string> list = new List <string> { "Location1", "Location2", "Location3", "Location4", "Location5", "Location6", "Location7", "Location8", "Location9", }; int num = random.Next(0, 9); if (list[num] == "Location1") { _MurderLocation = _Location1; } if (list[num] == "Location2") { _MurderLocation = _Location2; } if (list[num] == "Location3") { _MurderLocation = _Location3; } if (list[num] == "Location4") { _MurderLocation = _Location4; } if (list[num] == "Location5") { _MurderLocation = _Location5; } if (list[num] == "Location6") { _MurderLocation = _Location6; } if (list[num] == "Location7") { _MurderLocation = _Location7; } if (list[num] == "Location8") { _MurderLocation = _Location8; } if (list[num] == "Location9") { _MurderLocation = _Location9; } scenario = new Random().Next(0, 100); _CopV = new Vehicle(_CopCars[new Random().Next((int)_CopCars.Length)], _CopVSpawn, 76.214f); _CopV.IsEngineOn = true; _CopV.IsInteriorLightOn = true; _CopV.IsSirenOn = true; _CopV.IsSirenSilent = true; _CoronerV = new Vehicle("Speedo", _CoronerVSpawn, 22.32638f); _CoronerV.IsEngineOn = true; _CoronerV.IsInteriorLightOn = true; _CoronerV.IndicatorLightsStatus = VehicleIndicatorLightsStatus.Both; _DeadPerson = new Ped(_DeadPersonSpawn); _Murder = new Ped(_MurderLocation); _DeadPerson2 = new Ped(_Murder.GetOffsetPosition(new Vector3(0, 1.8f, 0))); _DeadPerson2.IsPersistent = true; _DeadPerson2.BlockPermanentEvents = true; _Cop1 = new Ped("s_m_y_sheriff_01", _Cop1Spawn, 0f); _Cop2 = new Ped("s_m_y_sheriff_01", _Cop2Spawn, 0f); _Coroner1 = new Ped("S_M_M_Doctor_01", _Coroner1Spawn, 0f); _Coroner2 = new Ped("S_M_M_Doctor_01", _Coroner2Spawn, 0f); _DeadPerson.Kill(); _DeadPerson.IsPersistent = true; _DeadPerson.BlockPermanentEvents = true; _Murder.IsPersistent = true; _Murder.Inventory.GiveNewWeapon(new WeaponAsset(_WepList[new Random().Next((int)_WepList.Length)]), 500, true); _Murder.BlockPermanentEvents = true; _Murder.Health = 200; _Murder.Armor = 300; NativeFunction.CallByName <uint>("TASK_AIM_GUN_AT_ENTITY", _Murder, _DeadPerson2, -1, true); _DeadPerson.Tasks.PlayAnimation("random@arrests@busted", "idle_a", 8.0F, AnimationFlags.Loop); Functions.IsPedACop(_Cop1); Functions.IsPedACop(_Cop2); _Cop1.IsInvincible = true; _Cop1.IsPersistent = true; _Cop1.BlockPermanentEvents = true; _Cop1.IsInvincible = true; _Cop1.IsPersistent = true; _Cop1.BlockPermanentEvents = true; _Coroner1.IsPersistent = true; _Coroner1.IsInvincible = true; _Coroner1.Face(_DeadPerson); _Coroner1.BlockPermanentEvents = true; _Coroner2.IsInvincible = true; _Coroner2.Face(_DeadPerson); _Coroner2.IsPersistent = true; _Coroner2.BlockPermanentEvents = true; _Coroner1.KeepTasks = false; _Coroner2.KeepTasks = false; Rage.Object camera = new Rage.Object("prop_ing_camera_01", _Coroner1.GetOffsetPosition(Vector3.RelativeTop * 30)); Rage.Object camera2 = new Rage.Object("prop_ing_camera_01", _Coroner2.GetOffsetPosition(Vector3.RelativeTop * 30)); _Coroner1.Tasks.PlayAnimation("amb@world_human_paparazzi@male@idle_a", "idle_a", 8.0F, AnimationFlags.Loop); _Coroner2.Tasks.PlayAnimation("amb@medic@standing@kneel@base", "base", 8.0F, AnimationFlags.Loop); _Cop2.Tasks.PlayAnimation("amb@world_human_cop_idles@male@idle_a", "idle_a", 1.5f, AnimationFlags.Loop); switch (new Random().Next(1, 2)) { case 1: _Scene1 = true; break; case 2: _Scene2 = true; break; } ShowCalloutAreaBlipBeforeAccepting(_DeadPersonSpawn, 100f); AddMinimumDistanceCheck(10f, _DeadPerson.Position); switch (new Random().Next(1, 2)) { case 1: CalloutMessage = "[UC]~w~ We have found a dead body and need the ~y~FIB~w~ here."; _callOutMessage = 1; break; case 2: CalloutMessage = "[UC]~w~ The police found a dead body and need the ~y~FIB~w~ here."; _callOutMessage = 2; break; } CalloutPosition = _DeadPersonSpawn; return(base.OnBeforeCalloutDisplayed()); }
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 (_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(); }