private void CloseToComputer() { if (_playerPos.DistanceTo(_station.Position) > 5f) { return; } if (_marker.Exists) { _marker.Stop(); } _marker = new Marker(_station.Position, Color.Yellow, Marker.MarkerTypes.MarkerTypeUpsideDownCone, true, true, true); SwapStages(CloseToComputer, AtComputer); }
private void CheckIfAtScene() //1. { if (!CsiCreator.FirstOfficer.Ped.Exists()) { return; } if (!_rancheck && Game.LocalPlayer.Character.Position.DistanceTo(CsiCreator.FirstOfficer.Ped.Position) < 25f) { _rancheck = true; var markerPos = new Vector3(CsiCreator.FirstOfficer.Spawn.X, CsiCreator.FirstOfficer.Spawn.Y, (CsiCreator.FirstOfficer.Spawn.Z + 1.6f)); _foMarker = new Marker(markerPos, Color.LightBlue); FoDialog.Position = CsiCreator.FirstOfficer.Ped.Position; "Arrived at scene".AddLog(); Functions.PlayScannerAudioUsingPosition("ATTENTION_ALL_UNITS_05 OFFICERS_AT_SCENE NO_FURTHER_UNITS CRIME_AMBULANCE_REQUESTED_02", CsiCreator.Victim.Position); Game.DisplayHelp("Talk to the ~b~First Officer~w~ at scene to receive a preliminary report."); if (_emsdispatched == false) { _emsdispatched = true; if (_betteremsSupport) { //ApiWrapper.RequestEms(CsiCreator.EmsLast, CsiCreator.EmsQueue); ("BetterEMS Transport = " + _emstransport).AddLog(); var surviveprob = _emstransport ? 1f : 0f; ApiWrapper.SetVictimData(CsiCreator.Victim.Ped, _vicData.BruiseLocation, "Cause: Sexual Assault", surviveprob); } else { CreateServices(ServiceType.Ems); GameFiber.Sleep(0500); ("LtFlashEMS Called; EMT exists: " + _ems.PedWorker.Exists()).AddLog(); } "~g~EMS~w~ Dispatched".DisplayNotification("EMS requested by the first officer", _caseData.Number); } } if (!(Game.LocalPlayer.Character.Position.DistanceTo(CsiCreator.FirstOfficer.Ped.Position) < 3f)) { return; } if (!_foNotified) { _foNotified = true; heading = CsiCreator.FirstOfficer.Heading; Game.DisplayHelp("Press ~y~Y~w~ to speak to the First Officer"); _foMarker.Stop(); } if (Game.IsKeyDown(Keys.Y) && !FoDialog.IsRunning) { _missionValue = _missionValue + 5; $"Mission value changed to: {_missionValue}".AddLog(); FoDialog.StartDialog(); _caseData.SajrsUpdates.Add("Obtained report from First Officer"); } if (!FoDialog.HasEnded) { return; } "First Officer Collected".AddLog(); "Sexual Assault Case Update".DisplayNotification("First Officer Conversation \nAdded to ~b~SAJRS", _caseData.Number); Game.DisplayHelp("Now that you have checked with the first officer, investigate the crime scene."); CsiCreator.FirstOfficer.Ped.Heading = heading; GameFiber.Sleep(0500); CsiCreator.FirstOfficer.Ped.Tasks.PlayAnimation("amb@code_human_police_crowd_control@idle_b", "idle_d", 4, AnimationFlags.Loop); SwapStages(CheckIfAtScene, Finished_FO); }