Esempio n. 1
0
        public override void End()
        {
            CalloutRunning = false;
            Rage.Native.NativeFunction.Natives.RESET_AI_MELEE_WEAPON_DAMAGE_MODIFIER();
            if (Game.LocalPlayer.Character.Exists())
            {
                if (Game.LocalPlayer.Character.IsDead)
                {
                    GameFiber.Wait(1500);
                    Functions.PlayScannerAudio("OFFICER HAS_BEEN_FATALLY_SHOT NOISE_SHORT OFFICER_NEEDS_IMMEDIATE_ASSISTANCE");
                    GameFiber.Wait(3000);
                }
            }
            else
            {
                GameFiber.Wait(1500);
                Functions.PlayScannerAudio("OFFICER HAS_BEEN_FATALLY_SHOT NOISE_SHORT OFFICER_NEEDS_IMMEDIATE_ASSISTANCE");
                GameFiber.Wait(3000);
            }
            base.End();

            if (PoliceOfficerBlip.Exists())
            {
                PoliceOfficerBlip.Delete();
            }

            if (CalloutFinished)
            {
                if (PoliceOfficer.Exists())
                {
                    PoliceOfficer.Dismiss();
                }
                if (PoliceCar.Exists())
                {
                    PoliceCar.Dismiss();
                }
                if (Suspect.Exists())
                {
                    if (!Suspect.IsInAnyVehicle(false))
                    {
                        Suspect.Dismiss();
                    }
                    else
                    {
                        if (Suspect.CurrentVehicle.Driver == Suspect)
                        {
                            Suspect.Dismiss();
                        }
                        else
                        {
                            Suspect.Delete();
                        }
                    }
                }
                if (SuspectCar.Exists())
                {
                    SuspectCar.Dismiss();
                }
            }
            else
            {
                if (PoliceCar.Exists())
                {
                    PoliceCar.Delete();
                }


                if (PoliceOfficer.Exists())
                {
                    PoliceOfficer.Delete();
                }
                if (Suspect.Exists())
                {
                    Suspect.Delete();
                }
                if (SuspectCar.Exists())
                {
                    SuspectCar.Delete();
                }
            }
        }