public override void Process() { base.Process(); if (IsFalseCall) { return; } switch (CalloutEState) { case EState.EnRoute: if (PlayerDistanceFromSpawnPoint > 100f) { break; } CalloutEState = EState.DecisionMade; if (ComputerPlus_Active) { ComputerPlusAPI.SetCalloutStatusToAtScene(ComputerPlus_GUID); } SetPedAsPursuitOrFight(PedList); break; case EState.DecisionMade: if (PlayerDistanceFromSpawnPoint > 30f) { break; } CalloutEState = EState.Checking; if (AreaBlip.Exists()) { AreaBlip.Delete(); } break; case EState.Checking: if (IsNearOfficer) { if (_cprStarted) { return; } if (!_helpDisplayed) { _helpDisplayed = true; Game.DisplayHelp("Press ~y~Y~w~ to perform CPR on the ~y~officer~w~ while you wait for ~g~EMS~w~"); } if (!Game.IsKeyDown(System.Windows.Forms.Keys.Y)) { return; } Game.LocalPlayer.Character.Position = CopPedList[0].LeftPosition; _procHost.ActivateProcess(StartCPR); _procHost.Start(); } break; } }
public static IBlip CreateAreaBlip(float x, float y, float z, float width, float height) { return(new Blip(AreaBlip.New(x, y, z, width, height))); }