コード例 #1
0
 public override void End()
 {
     PedHelper.DeclareSubjectStatus(suspect);
     if (suspect.Exists())
     {
         Game.LogTrivial("[DiamondCasinoTrouble/HotCallouts] Attmepting to dismiss suspect...");
         if (!Functions.IsPedArrested(suspect))
         {
             suspect.Dismiss();
         }
         else
         {
             Game.LogTrivial("[DiamondCasinoTrouble/HotCallouts] Suspect was not dismissed to prevent them taking over player vehicle.");
         }
     }
     if (security.Exists())
     {
         security.Dismiss();
     }
     if (susB.Exists())
     {
         susB.Delete();
     }
     if (b.Exists())
     {
         b.Delete();
     }
     base.End();
 }
コード例 #2
0
ファイル: CarThief.cs プロジェクト: rcdraft/HotCalloutsV
        public override void Process()
        {
            base.Process();

            if (!approach && Game.LocalPlayer.Character.Position.DistanceTo(suspect) < 30f)
            {
                approach = true;
                Game.DisplayHelp("Perform a traffic stop to target " + suspectVehicle.Model.Name + ".");
            }

            /*
             * if(!pursuited && Game.LocalPlayer.Character.Position.DistanceTo(suspect) < 30f)
             * {
             *  pursuit = Functions.CreatePursuit();
             *  Functions.AddPedToPursuit(pursuit, suspect);
             *  Functions.SetPursuitIsActiveForPlayer(pursuit, true);
             *  pursuited = true;
             *  ScannerHelper.DisplayDispatchDialogue("You", "To dispatch, suspect fleeing.");
             *  ScannerHelper.DisplayDispatchDialogue("Dispatch", "Affirmtive, suspect plate " + suspectVehicle.LicensePlate.ToUpper() + ", vehicle " + suspectVehicle.Model.Name);
             *  Functions.RequestBackup(suspect.Position, LSPD_First_Response.EBackupResponseType.Pursuit, LSPD_First_Response.EBackupUnitType.LocalUnit);
             * }
             *
             * if(pursuited && !Functions.IsPursuitStillRunning(pursuit))
             * {
             *  PedHelper.DeclareSubjectStatus(suspect);
             *  End();
             * }
             */
            if (!inPursuit && Functions.IsPedInPursuit(suspect))
            {
                inPursuit = true;
                ScannerHelper.DisplayDispatchDialogue("You", "To dispatch, suspect fleeing.");
            }
            if (!suspect.Exists() || suspect.IsDead || Functions.IsPedArrested(suspect))
            {
                PedHelper.DeclareSubjectStatus(suspect);
                End();
            }
        }