private void ExitingMe() { if (Game.LocalPlayer.Character.Position.DistanceTo(MeCreator.PPos) < 1f && _startingswap == false) { _startingswap = true; _meMarker.Stop(); Game.LocalPlayer.Character.IsPositionFrozen = true; GameFiber.StartNew(delegate { "Exiting ME's office".AddLog(); NativeFunction.Natives.DO_SCREEN_FADE_OUT(4000); GameFiber.Sleep(4100); Game.LocalPlayer.Character.Position = _markerLoc; if (_nearestMe == "PB" || _nearestMe == "SS") { MainSpawn = new Fiskey111Common.SpawnPt(50, -233, -1390, 30); _meCar = new Vehicle("FBI", MainSpawn.Spawn); _meCar.Heading = MainSpawn.Heading; _meCar.IsInvincible = true; _meCar.TopSpeed = 100f; _me = new Ped("s_m_m_highsec_01", _position, 0f); _me.WarpIntoVehicle(_meCar, -1); _meCar.IndicatorLightsStatus = VehicleIndicatorLightsStatus.Both; _transport = true; } while (true) { if (NativeFunction.Natives.IS_SCREEN_FADED_OUT <bool>() == true) { "Screen faded, swapping stages".AddLog(); GameFiber.Sleep(1000); break; } GameFiber.Yield(); } Game.LocalPlayer.Character.IsPositionFrozen = false; NativeFunction.Natives.DO_SCREEN_FADE_IN(1000); GameFiber.Sleep(1500); if (_transport) { SwapStages(ExitingMe, Returning); } else { SetScriptFinished(); } }); } }
// todo -- fix all this crap below protected override bool Initialize() { "Initializing L.S. Noir Callout: Sexual Assault -- Stage 2b [Medical Examiner]".AddLog(); _position = GetNearestMe(Game.LocalPlayer.Character.Position); ExtensionMethods.LogDistanceFromCallout(_position); if (GetNearestMe(Game.LocalPlayer.Character.Position) == _blaineMe) { CarSpawn = new Fiskey111Common.SpawnPt(31, 1839, 3666, 34); _meCar = new Vehicle("FBI", CarSpawn.Spawn); _meCar.Heading = CarSpawn.Heading; _me = new Ped("s_m_m_highsec_01", _position, 233f); _main = false; _nearestMe = "SS"; "Closest to Sandy Shores Location".AddLog(); } if (GetNearestMe(Game.LocalPlayer.Character.Position) == _paletoMe) { CarSpawn = new Fiskey111Common.SpawnPt(313, -453, 6034, 31); _meCar = new Vehicle("FBI", CarSpawn.Spawn); _meCar.Heading = CarSpawn.Heading; _meCar.IsInvincible = true; _meCar.TopSpeed = 100f; _me = new Ped("s_m_m_highsec_01", _position, 0f); _main = false; _nearestMe = "PB"; "Closest to Paleto Bay Location".AddLog(); } _MEBlip = new Blip(_position) { Sprite = BlipSprite.GangAttackPackage, Color = Color.DarkOrange, Name = "Medical Examiner" }; _cData = Serializer.LoadItemFromXML <CaseData>(Main.CDataPath); "Sexual Assault Case Update".DisplayNotification("Visit ~o~Medical Examiner~w~ for update", _cData.Number); _state = ELocation.Dispatched; InteriorHelper.IsCoronerInteriorEnabled = true; return(true); }