private void AtLocation() { if (!_atlocation) { _atlocation = true; "Notified to go to marker".AddLog(); Game.DisplayHelp("Head to the ~y~marker~w~ to enter the Medical Examiner's office"); _meMarker = new Marker(_markerLoc, Color.Yellow, Marker.MarkerTypes.MarkerTypeUpsideDownCone, true, true, true); } if (Game.LocalPlayer.Character.Position.DistanceTo(_markerLoc) <= 1f && _startingswap == false) { _startingswap = true; _meMarker.Stop(); GameFiber.StartNew(delegate { "Entering ME's office".AddLog(); CamClass.FocusCamOnObjectWithInterpolation(new Vector3(219, -1422, 35), 200); NativeFunction.Natives.DO_SCREEN_FADE_OUT(8000); GameFiber.Sleep(8100); MeCreator.CreateScene(Game.LocalPlayer.Character.Position, _mainMe); while (true) { if (NativeFunction.Natives.IS_SCREEN_FADED_OUT <bool>() == true) { "Screen faded, swapping stages".AddLog(); GameFiber.Sleep(1000); ("Does ME Exist " + MeCreator.MedicalExaminer.Ped.Exists()).AddLog(); break; } GameFiber.Yield(); } CamClass.InterpolateCameraBack(); SwapStages(AtLocation, InMe); }); } }
private void TimeWarp(int time) { if (World.IsTimeOfDayFrozen) { World.IsTimeOfDayFrozen = false; } GameFiber.StartNew(delegate { CamClass.FocusCamOnObjectWithInterpolation(Game.LocalPlayer.Character.AbovePosition, 0f); var checkTime = time; while (World.DateTime.Hour != checkTime) { var finalDate = World.DateTime.AddMinutes(1d); World.DateTime = finalDate; GameFiber.Yield(); } CamClass.InterpolateCameraBack(); Game.DisplayHelp("To have your officers prepare for the raid, press ~y~Y~w~"); SwapStages(AwaitingExitVehicle, AwaitingAcceptance); }); }