Exemple #1
0
 // Token: 0x0600009E RID: 158 RVA: 0x00012510 File Offset: 0x00010710
 public override bool OnBeforeCalloutDisplayed()
 {
     this.SpawnPoint = NOOSEHeadquarters.sPos_prota;
     EManager.limoM  = new Vehicle(Main.vPatrol1, NOOSEHeadquarters.sPos_limo, NOOSEHeadquarters.he_limo);
     EManager.fbi1M  = new Vehicle(Main.vPatrol2, NOOSEHeadquarters.sPos_fbi1, NOOSEHeadquarters.he_fbi1);
     EManager.fbi2M  = new Vehicle(Main.vPatrol3, NOOSEHeadquarters.sPos_fbi2, NOOSEHeadquarters.he_fbi2);
     Noose_HQ_To_Maze_Bank.p_limo = new Ped("S_M_M_FIBOffice_01", EManager.limoM.Position, 0f);
     Noose_HQ_To_Maze_Bank.p_limo.WarpIntoVehicle(EManager.limoM, -1);
     Noose_HQ_To_Maze_Bank.p_fbi1 = new Ped("S_M_M_FIBOffice_02", EManager.fbi1M.Position, 0f);
     Noose_HQ_To_Maze_Bank.p_fbi1.WarpIntoVehicle(EManager.fbi1M, -1);
     Noose_HQ_To_Maze_Bank.p_fbi2 = new Ped("U_M_M_JewelSec_01", EManager.fbi2M.Position, 0f);
     Noose_HQ_To_Maze_Bank.p_fbi2.WarpIntoVehicle(EManager.fbi2M, -1);
     if (!EntityExtensions.Exists(Noose_HQ_To_Maze_Bank.p_limo))
     {
         return(false);
     }
     if (!EntityExtensions.Exists(Noose_HQ_To_Maze_Bank.p_fbi1))
     {
         return(false);
     }
     if (!EntityExtensions.Exists(Noose_HQ_To_Maze_Bank.p_fbi2))
     {
         return(false);
     }
     base.ShowCalloutAreaBlipBeforeAccepting(this.SpawnPoint, 25f);
     base.AddMinimumDistanceCheck(15f, this.SpawnPoint);
     base.CalloutMessage  = "Protection : NOOSE HQ to Maze Bank";
     base.CalloutPosition = this.SpawnPoint;
     Functions.PlayScannerAudioUsingPosition("WE_HAVE CONVOY_ESCORT IN_OR_ON_POSITION", this.SpawnPoint);
     return(base.OnBeforeCalloutDisplayed());
 }
Exemple #2
0
 // Token: 0x06000068 RID: 104 RVA: 0x00008620 File Offset: 0x00006820
 public override bool OnBeforeCalloutDisplayed()
 {
     this.SpawnPoint = GalileoObservatory.sPos_prota;
     EManager.limoM  = new Vehicle(Main.vPatrol1, GalileoObservatory.sPos_limo, GalileoObservatory.he_limo);
     EManager.fbi1M  = new Vehicle(Main.vPatrol2, GalileoObservatory.sPos_fbi1, GalileoObservatory.he_fbi1);
     EManager.fbi2M  = new Vehicle(Main.vPatrol3, GalileoObservatory.sPos_fbi2, GalileoObservatory.he_fbi2);
     Observatory_to_Richards_Majestic.p_limo = new Ped("S_M_M_FIBOffice_01", EManager.limoM.Position, 0f);
     Observatory_to_Richards_Majestic.p_limo.WarpIntoVehicle(EManager.limoM, -1);
     Observatory_to_Richards_Majestic.p_fbi1 = new Ped("S_M_M_FIBOffice_02", EManager.fbi1M.Position, 0f);
     Observatory_to_Richards_Majestic.p_fbi1.WarpIntoVehicle(EManager.fbi1M, -1);
     Observatory_to_Richards_Majestic.p_fbi2 = new Ped("U_M_M_JewelSec_01", EManager.fbi2M.Position, 0f);
     Observatory_to_Richards_Majestic.p_fbi2.WarpIntoVehicle(EManager.fbi2M, -1);
     if (!EntityExtensions.Exists(Observatory_to_Richards_Majestic.p_limo))
     {
         return(false);
     }
     if (!EntityExtensions.Exists(Observatory_to_Richards_Majestic.p_fbi1))
     {
         return(false);
     }
     if (!EntityExtensions.Exists(Observatory_to_Richards_Majestic.p_fbi2))
     {
         return(false);
     }
     base.ShowCalloutAreaBlipBeforeAccepting(this.SpawnPoint, 25f);
     base.AddMinimumDistanceCheck(15f, this.SpawnPoint);
     base.CalloutMessage  = "Protection : Galileo Observatory to Richards Majestic";
     base.CalloutPosition = this.SpawnPoint;
     Functions.PlayScannerAudioUsingPosition("WE_HAVE CONVOY_ESCORT IN_OR_ON_POSITION", this.SpawnPoint);
     return(base.OnBeforeCalloutDisplayed());
 }
Exemple #3
0
 // Token: 0x060000B1 RID: 177 RVA: 0x0001589C File Offset: 0x00013A9C
 public override bool OnBeforeCalloutDisplayed()
 {
     this.SpawnPoint = Bolingbroke_EMS.sPosProta;
     Ambulance_Escort_Bollingbrook_to_Davis.limo   = new Vehicle("AMBULANCE", Bolingbroke_EMS.sPosAmbulance, Bolingbroke_EMS.he_ambulance);
     Ambulance_Escort_Bollingbrook_to_Davis.pems_1 = new Ped("S_M_M_Paramedic_01", Ambulance_Escort_Bollingbrook_to_Davis.limo.Position, 0f);
     Ambulance_Escort_Bollingbrook_to_Davis.pems_1.WarpIntoVehicle(Ambulance_Escort_Bollingbrook_to_Davis.limo, -1);
     if (!EntityExtensions.Exists(Ambulance_Escort_Bollingbrook_to_Davis.limo))
     {
         return(false);
     }
     if (!EntityExtensions.Exists(Ambulance_Escort_Bollingbrook_to_Davis.pems_1))
     {
         return(false);
     }
     base.ShowCalloutAreaBlipBeforeAccepting(this.SpawnPoint, 25f);
     base.AddMinimumDistanceCheck(15f, this.SpawnPoint);
     base.CalloutMessage  = "Ambulance Escort : State Penitentiary";
     base.CalloutPosition = this.SpawnPoint;
     Functions.PlayScannerAudioUsingPosition("WE_HAVE CONVOY_ESCORT IN_OR_ON_POSITION", this.SpawnPoint);
     return(base.OnBeforeCalloutDisplayed());
 }
Exemple #4
0
 // Token: 0x060000AA RID: 170 RVA: 0x00014774 File Offset: 0x00012974
 public override bool OnBeforeCalloutDisplayed()
 {
     this.SpawnPoint = VespucciPolice.sPos_prota;
     EManager.limoM  = new Vehicle("PBUS", VespucciPolice.sPos_bus, VespucciPolice.he_bus);
     EManager.fbi1M  = new Vehicle("FBI2", VespucciPolice.sPos_riot, VespucciPolice.he_riot);
     Prisoner_Transport_Vespucci_to_Bollingbrook.p_limo = new Ped("S_M_Y_Swat_01", EManager.limoM.Position, 0f);
     Prisoner_Transport_Vespucci_to_Bollingbrook.p_limo.WarpIntoVehicle(EManager.limoM, -1);
     this.p_fbi1 = new Ped("MP_M_FIBSec_01", EManager.fbi1M.Position, 0f);
     this.p_fbi1.WarpIntoVehicle(EManager.fbi1M, -1);
     if (!EntityExtensions.Exists(Prisoner_Transport_Vespucci_to_Bollingbrook.p_limo))
     {
         return(false);
     }
     if (!EntityExtensions.Exists(this.p_fbi1))
     {
         return(false);
     }
     base.ShowCalloutAreaBlipBeforeAccepting(this.SpawnPoint, 25f);
     base.AddMinimumDistanceCheck(15f, this.SpawnPoint);
     base.CalloutMessage  = "Prisoner Transfer : Vespucci Police Station";
     base.CalloutPosition = this.SpawnPoint;
     Functions.PlayScannerAudioUsingPosition("WE_HAVE CONVOY_ESCORT IN_OR_ON_POSITION", this.SpawnPoint);
     return(base.OnBeforeCalloutDisplayed());
 }
Exemple #5
0
        // Token: 0x0600006B RID: 107 RVA: 0x000088A0 File Offset: 0x00006AA0
        public override void Process()
        {
            base.Process();
            this.isCalloutAccepted = true;
            while (Vector3.Distance(Game.LocalPlayer.Character.Position, this.SpawnPoint) > 35f)
            {
                GameFiber.Yield();
            }
            NativeFunction.CallByName <uint>("CLEAR_ALL_HELP_MESSAGES", Array.Empty <NativeArgument>());
            if (Game.LocalPlayer.Character.IsInAnyVehicle(false))
            {
                try
                {
                    Observatory_to_Richards_Majestic.prota = Game.LocalPlayer.Character.CurrentVehicle;
                    goto IL_AC;
                }
                catch (Exception)
                {
                    Observatory_to_Richards_Majestic.prota = new Vehicle("FBI2", GalileoObservatory.sPos_prota, GalileoObservatory.he_prota);
                    goto IL_AC;
                }
            }
            Observatory_to_Richards_Majestic.prota = new Vehicle("FBI2", GalileoObservatory.sPos_prota, GalileoObservatory.he_prota);
IL_AC:
            if (Observatory_to_Richards_Majestic.prota == null || !Observatory_to_Richards_Majestic.prota.IsValid() || !EntityExtensions.Exists(Observatory_to_Richards_Majestic.prota))
            {
                Observatory_to_Richards_Majestic.prota = new Vehicle("FBI2", GalileoObservatory.sPos_prota, GalileoObservatory.he_prota);
            }
            EManager.protaM = Observatory_to_Richards_Majestic.prota;
            this.blBlip.Delete();
            Observatory_to_Richards_Majestic.p_fbi1.Inventory.GiveNewWeapon(EManager.vWeaponsList.ElementAt(new Random().Next(1, EManager.vWeaponsList.Count)), 500, true);
            Observatory_to_Richards_Majestic.p_fbi2.Inventory.GiveNewWeapon(EManager.vWeaponsList.ElementAt(new Random().Next(1, EManager.vWeaponsList.Count)), 300, true);
            Observatory_to_Richards_Majestic.p_limo.Inventory.GiveNewWeapon(EManager.vWeaponsList.ElementAt(new Random().Next(1, EManager.vWeaponsList.Count)), 200, true);
            Game.DisplaySubtitle("Park your car at the ~y~stand-by checkpoint~w~ and wait for the VIP.", 5000);
            int num = NativeFunction.CallByName <int>("CREATE_CHECKPOINT", new NativeArgument[]
            {
                0,
                GalileoObservatory.sPos_prota.X,
                GalileoObservatory.sPos_prota.Y,
                GalileoObservatory.sPos_prota.Z,
                0,
                0,
                0,
                5f,
                (int)Color.Yellow.R,
                (int)Color.Yellow.G,
                (int)Color.Yellow.B,
                30,
                0
            });

            while (Vector3.Distance(Game.LocalPlayer.Character.Position, this.SpawnPoint) > 3f)
            {
                GameFiber.Yield();
            }
            NativeFunction.CallByName <uint>("DELETE_CHECKPOINT", new NativeArgument[]
            {
                num
            });
            UI.canReturn = false;
            UI.EscortInfo();
            this.fbi1         = EManager.fbi1M;
            this.fbi2         = EManager.fbi2M;
            this.limo         = EManager.limoM;
            Game.FrameRender += EManager.Game_FrameRenderRes;
            GameFiber.StartNew(new ThreadStart(new EManager().ManageRiskLevel));
            Game.DisplaySubtitle("Wait for the VIP to take his seat.", 5000);
            GameFiber.Sleep(4000);
            Observatory_to_Richards_Majestic.vip = new Ped(EManager.vipModel, GalileoObservatory.wPos_vip, GalileoObservatory.he_vip);
            Observatory_to_Richards_Majestic.vip.MakePersistent();
            Observatory_to_Richards_Majestic.vip.Tasks.FollowNavigationMeshToPosition(this.limo.Position, 0.7f, this.limo.Heading, 0f);
            Observatory_to_Richards_Majestic.vip.IsVisible = true;
            GameFiber.StartNew(new ThreadStart(new EManager().isVIPDead));
            EManager.currentCallState = EManager.CallState.EscortInProgress;
            while (Vector3.Distance(Observatory_to_Richards_Majestic.vip.Position, this.limo.Position) > 15f)
            {
                GameFiber.Yield();
            }
            Observatory_to_Richards_Majestic.p_fbi1.RelationshipGroup = "POLICE";
            Observatory_to_Richards_Majestic.p_fbi2.RelationshipGroup = "POLICE";
            Observatory_to_Richards_Majestic.p_limo.RelationshipGroup = "POLICE";
            Observatory_to_Richards_Majestic.vip.RelationshipGroup    = "POLICE";
            Observatory_to_Richards_Majestic.vip.Tasks.EnterVehicle(this.limo, 2).WaitForCompletion();
            Observatory_to_Richards_Majestic.vip.BlockPermanentEvents = true;
            this.limo.MakePersistent();
            this.fbi1.MakePersistent();
            this.fbi2.MakePersistent();
            Observatory_to_Richards_Majestic.prota.MakePersistent();
            this.b_limo        = this.limo.AttachBlip();
            this.b_fbi1        = this.fbi1.AttachBlip();
            this.b_fbi2        = this.fbi2.AttachBlip();
            this.b_limo.Sprite = 58;
            this.b_fbi1.Sprite = 1;
            this.b_fbi2.Sprite = 1;
            Game.FrameRender  -= EManager.Game_FrameRenderRes;
            Game.SetRelationshipBetweenRelationshipGroups(Observatory_to_Richards_Majestic.p_limo.RelationshipGroup, Game.LocalPlayer.Character.RelationshipGroup, 1);
            Game.SetRelationshipBetweenRelationshipGroups(Game.LocalPlayer.Character.RelationshipGroup, Observatory_to_Richards_Majestic.p_limo.RelationshipGroup, 1);
            Game.SetRelationshipBetweenRelationshipGroups("ATTACKERS", Observatory_to_Richards_Majestic.p_limo.RelationshipGroup, 5);
            Game.SetRelationshipBetweenRelationshipGroups("COP", Observatory_to_Richards_Majestic.p_fbi1.RelationshipGroup, 1);
            Game.SetRelationshipBetweenRelationshipGroups(Observatory_to_Richards_Majestic.p_fbi1.RelationshipGroup, "COP", 1);
            Observatory_to_Richards_Majestic.p_limo.CanAttackFriendlies = false;
            Observatory_to_Richards_Majestic.p_fbi1.CanAttackFriendlies = false;
            Observatory_to_Richards_Majestic.p_fbi2.CanAttackFriendlies = false;
            Game.FrameRender += EManager.Game_FrameRender;
            Game.LogTrivial("<<<< Los Santos Protection Unit >>>> Please stay close to your team members to ensure their security.");
            Game.DisplaySubtitle("Lead the team to the ~r~" + EManager.currentDestination + "~w~.", 6000);
            GameFiber.StartNew(new ThreadStart(new EManager().GenerateRandomEnemies));
            GameFiber.StartNew(new ThreadStart(new EManager().GenerateEnemiesWithZone));
            Observatory_to_Richards_Majestic.arBlip       = new Blip(RichardsMajesticStudio.sPos_prota);
            Observatory_to_Richards_Majestic.arBlip.Color = Color.Red;
            Observatory_to_Richards_Majestic.arBlip.EnableRoute(Color.Red);
            GameFiber.StartNew(new ThreadStart(new EManager().ExternalEvent));
            this.limo.IsSirenOn = true;
            this.fbi1.IsSirenOn = true;
            this.fbi2.IsSirenOn = true;
            if (Main.muteSirens)
            {
                this.limo.IsSirenOn     = true;
                this.fbi1.IsSirenSilent = true;
                this.fbi2.IsSirenSilent = true;
            }
            NativeFunction.CallByName <uint>("TASK_VEHICLE_ESCORT", new NativeArgument[]
            {
                Observatory_to_Richards_Majestic.p_limo,
                this.limo,
                Observatory_to_Richards_Majestic.prota,
                -1,
                21f,
                1074528293,
                6f,
                -1,
                15f
            });
            NativeFunction.CallByName <uint>("TASK_VEHICLE_ESCORT", new NativeArgument[]
            {
                Observatory_to_Richards_Majestic.p_fbi1,
                this.fbi1,
                this.limo,
                -1,
                22f,
                1074528293,
                7f,
                -1,
                15f
            });
            NativeFunction.CallByName <uint>("TASK_VEHICLE_ESCORT", new NativeArgument[]
            {
                Observatory_to_Richards_Majestic.p_fbi2,
                this.fbi2,
                this.fbi1,
                -1,
                21f,
                1074528293,
                6f,
                -1,
                15f
            });
            GameFiber.StartNew(new ThreadStart(new EManager().StuckVehicle));
            GameFiber.StartNew(new ThreadStart(new EManager().DistanceWatcher));
            Ped ped = new Ped("S_M_Y_Construct_01", RichardsMajesticStudio.sPos_limo, RichardsMajesticStudio.he_limo);

            Game.FrameRender += EManager.Mod_Controls1;
            GameFiber.Sleep(12000);
            Game.FrameRender -= EManager.Mod_Controls1;
            while (Vector3.Distance(Game.LocalPlayer.Character.Position, RichardsMajesticStudio.sPos_prota) > 75f)
            {
                GameFiber.Yield();
            }
            Vehicle[] nearbyVehicles = ped.GetNearbyVehicles(14);
            try
            {
                foreach (Vehicle vehicle in nearbyVehicles)
                {
                    if (!vehicle.IsEngineOn)
                    {
                        vehicle.Delete();
                    }
                    GameFiber.Yield();
                }
            }
            catch (Exception)
            {
            }
            ped.Delete();
            while (Vector3.Distance(Game.LocalPlayer.Character.Position, RichardsMajesticStudio.sPos_prota) > 60f)
            {
                GameFiber.Yield();
            }
            Observatory_to_Richards_Majestic.arBlip.Delete();
            EManager.currentCallState = EManager.CallState.Parking;
            int     num2;
            Vector3 vector;

            if (!EManager.isPlayerDrivingLimo)
            {
                num2 = NativeFunction.CallByName <int>("CREATE_CHECKPOINT", new NativeArgument[]
                {
                    0,
                    RichardsMajesticStudio.sPos_prota.X,
                    RichardsMajesticStudio.sPos_prota.Y,
                    RichardsMajesticStudio.sPos_prota.Z,
                    0,
                    0,
                    0,
                    5f,
                    (int)Color.Yellow.R,
                    (int)Color.Yellow.G,
                    (int)Color.Yellow.B,
                    50,
                    0
                });
                vector..ctor(RichardsMajesticStudio.sPos_prota.X, RichardsMajesticStudio.sPos_prota.Y, RichardsMajesticStudio.sPos_prota.Z);
            }
            else
            {
                num2 = NativeFunction.CallByName <int>("CREATE_CHECKPOINT", new NativeArgument[]
                {
                    0,
                    RichardsMajesticStudio.sPos_limo.X,
                    RichardsMajesticStudio.sPos_limo.Y,
                    RichardsMajesticStudio.sPos_limo.Z,
                    0,
                    0,
                    0,
                    5f,
                    (int)Color.Yellow.R,
                    (int)Color.Yellow.G,
                    (int)Color.Yellow.B,
                    50,
                    0
                });
                vector..ctor(RichardsMajesticStudio.sPos_limo.X, RichardsMajesticStudio.sPos_limo.Y, RichardsMajesticStudio.sPos_limo.Z);
            }
            Game.DisplaySubtitle("Park the car at the ~y~stand-by point~w~.", 5000);
            if (!EManager.isPlayerDrivingLimo)
            {
                Observatory_to_Richards_Majestic.p_limo.Tasks.ParkVehicle(RichardsMajesticStudio.sPos_limo, RichardsMajesticStudio.he_limo);
            }
            Game.FrameRender += EManager.Mod_Controls2;
            try
            {
                Observatory_to_Richards_Majestic.p_fbi1.Tasks.ParkVehicle(RichardsMajesticStudio.sPos_fbi1, RichardsMajesticStudio.he_fbi1);
            }
            catch (Exception)
            {
                Game.LogTrivial("Fbi1 couldn't park.");
            }
            GameFiber.Sleep(4000);
            try
            {
                Observatory_to_Richards_Majestic.p_fbi2.Tasks.ParkVehicle(RichardsMajesticStudio.sPos_fbi2, RichardsMajesticStudio.he_fbi2);
                goto IL_BCF;
            }
            catch (Exception)
            {
                Game.LogTrivial("Fbi2 couldn't park.");
                goto IL_BCF;
            }
IL_BCA:
            GameFiber.Yield();
IL_BCF:
            if (Vector3.Distance(Game.LocalPlayer.Character.Position, vector) <= 4f)
            {
                Game.FrameRender -= EManager.Mod_Controls2;
                GameFiber.Sleep(2000);
                NativeFunction.CallByName <uint>("DELETE_CHECKPOINT", new NativeArgument[]
                {
                    num2
                });
                while (Vector3.Distance(this.limo.Position, RichardsMajesticStudio.sPos_limo) > 5f)
                {
                    GameFiber.Yield();
                }
                if (!EManager.isPlayerDrivingLimo)
                {
                    Observatory_to_Richards_Majestic.p_limo.Tasks.Clear();
                    Observatory_to_Richards_Majestic.p_limo.Tasks.LeaveVehicle(256);
                }
                EManager.currentCallState = EManager.CallState.Arrived;
                Game.DisplaySubtitle("Leave the vehicle and stay close to the VIP.", 5000);
                Observatory_to_Richards_Majestic.vip.Tasks.FollowNavigationMeshToPosition(RichardsMajesticStudio.wPos_vip, RichardsMajesticStudio.he_vip - 180f, 0.5f).WaitForCompletion();
                Observatory_to_Richards_Majestic.vip.Delete();
                Game.DisplaySubtitle("~g~MISSION COMPLETE ~w~: You have successfully transported the VIP.", 5000);
                this.End();
                return;
            }
            goto IL_BCA;
        }
Exemple #6
0
        // Token: 0x060000B4 RID: 180 RVA: 0x00015A38 File Offset: 0x00013C38
        public override void Process()
        {
            base.Process();
            this.isCalloutAccepted = true;
            while (Vector3.Distance(Game.LocalPlayer.Character.Position, this.SpawnPoint) > 35f)
            {
                GameFiber.Yield();
            }
            NativeFunction.CallByName <uint>("CLEAR_ALL_HELP_MESSAGES", Array.Empty <NativeArgument>());
            if (Game.LocalPlayer.Character.IsInAnyVehicle(false))
            {
                try
                {
                    Ambulance_Escort_Bollingbrook_to_Davis.prota = Game.LocalPlayer.Character.CurrentVehicle;
                    goto IL_AC;
                }
                catch (Exception)
                {
                    Ambulance_Escort_Bollingbrook_to_Davis.prota = new Vehicle("POLICE4", Bolingbroke_EMS.sPosProta, Bolingbroke_EMS.he_prota);
                    goto IL_AC;
                }
            }
            Ambulance_Escort_Bollingbrook_to_Davis.prota = new Vehicle("POLICE4", Bolingbroke_EMS.sPosProta, Bolingbroke_EMS.he_prota);
IL_AC:
            if (Ambulance_Escort_Bollingbrook_to_Davis.prota == null || !Ambulance_Escort_Bollingbrook_to_Davis.prota.IsValid() || !EntityExtensions.Exists(Ambulance_Escort_Bollingbrook_to_Davis.prota))
            {
                Ambulance_Escort_Bollingbrook_to_Davis.prota = new Vehicle("POLICE4", Bolingbroke_EMS.sPosProta, Bolingbroke_EMS.he_prota);
            }
            EManager.protaM = Ambulance_Escort_Bollingbrook_to_Davis.prota;
            this.blBlip.Delete();
            Game.DisplaySubtitle("Park your car at the ~y~stand-by checkpoint~w~ and wait for the injured inmate.", 5000);
            int num = NativeFunction.CallByName <int>("CREATE_CHECKPOINT", new NativeArgument[]
            {
                0,
                Bolingbroke_EMS.sPosProta.X,
                Bolingbroke_EMS.sPosProta.Y,
                Bolingbroke_EMS.sPosProta.Z,
                0,
                0,
                0,
                5f,
                (int)Color.Yellow.R,
                (int)Color.Yellow.G,
                (int)Color.Yellow.B,
                30,
                0
            });

            while (Vector3.Distance(Game.LocalPlayer.Character.Position, this.SpawnPoint) > 3f)
            {
                GameFiber.Yield();
            }
            NativeFunction.CallByName <uint>("DELETE_CHECKPOINT", new NativeArgument[]
            {
                num
            });
            UI.canReturn = false;
            UI.EscortInfo();
            SCALL_Manager.GeneratePrisoner_EMS();
            Game.FrameRender += SCALL_Manager.Game_FrameRenderRes_EMS;
            GameFiber.StartNew(new ThreadStart(new EManager().ManageRiskLevel));
            Game.DisplaySubtitle("Wait for the inmate to get in the ambulance.", 5000);
            GameFiber.Sleep(6000);
            Ambulance_Escort_Bollingbrook_to_Davis.vip = new Ped("S_M_Y_Prisoner_01", Bolingbroke_EMS.wPos_prisoner, Bolingbroke_EMS.he_prisoner);
            Ambulance_Escort_Bollingbrook_to_Davis.vip.MakePersistent();
            GameFiber.StartNew(new ThreadStart(new SCALL_Manager().isVIPDead_EMS));
            Ambulance_Escort_Bollingbrook_to_Davis.vip.Tasks.EnterVehicle(Ambulance_Escort_Bollingbrook_to_Davis.limo, 1).WaitForCompletion();
            Ambulance_Escort_Bollingbrook_to_Davis.pems_2 = new Ped("S_M_M_Paramedic_01", Bolingbroke_EMS.wPos_prisoner, Bolingbroke_EMS.he_prisoner);
            Ambulance_Escort_Bollingbrook_to_Davis.pems_2.MakePersistent();
            Ambulance_Escort_Bollingbrook_to_Davis.pems_2.Tasks.EnterVehicle(Ambulance_Escort_Bollingbrook_to_Davis.limo, 0).WaitForCompletion();
            EManager.currentCallState = EManager.CallState.EscortInProgress;
            Ambulance_Escort_Bollingbrook_to_Davis.vip.BlockPermanentEvents    = true;
            Ambulance_Escort_Bollingbrook_to_Davis.pems_1.BlockPermanentEvents = true;
            Ambulance_Escort_Bollingbrook_to_Davis.pems_2.BlockPermanentEvents = true;
            Ambulance_Escort_Bollingbrook_to_Davis.limo.MakePersistent();
            Ambulance_Escort_Bollingbrook_to_Davis.prota.MakePersistent();
            Ambulance_Escort_Bollingbrook_to_Davis.limo.IsSirenOn     = true;
            Ambulance_Escort_Bollingbrook_to_Davis.limo.IsSirenSilent = true;
            this.b_limo        = Ambulance_Escort_Bollingbrook_to_Davis.limo.AttachBlip();
            this.b_limo.Sprite = 58;
            Game.FrameRender  -= SCALL_Manager.Game_FrameRenderRes_EMS;
            Ambulance_Escort_Bollingbrook_to_Davis.vip.RelationshipGroup    = "POLICE";
            Ambulance_Escort_Bollingbrook_to_Davis.pems_1.RelationshipGroup = "POLICE";
            Ambulance_Escort_Bollingbrook_to_Davis.pems_2.RelationshipGroup = "POLICE";
            Game.SetRelationshipBetweenRelationshipGroups(Ambulance_Escort_Bollingbrook_to_Davis.vip.RelationshipGroup, Game.LocalPlayer.Character.RelationshipGroup, 1);
            Game.SetRelationshipBetweenRelationshipGroups(Game.LocalPlayer.Character.RelationshipGroup, Ambulance_Escort_Bollingbrook_to_Davis.vip.RelationshipGroup, 1);
            Game.SetRelationshipBetweenRelationshipGroups("ATTACKERS", Ambulance_Escort_Bollingbrook_to_Davis.vip.RelationshipGroup, 5);
            Game.SetRelationshipBetweenRelationshipGroups("COP", Ambulance_Escort_Bollingbrook_to_Davis.vip.RelationshipGroup, 1);
            Game.SetRelationshipBetweenRelationshipGroups(Ambulance_Escort_Bollingbrook_to_Davis.vip.RelationshipGroup, "COP", 1);
            Game.FrameRender += EManager.Game_FrameRender_SP1;
            Game.LogTrivial("<<<< Los Santos Protection Unit >>>> Please stay close to your team members to ensure their security.");
            Game.DisplaySubtitle("Lead the team to the ~r~" + EManager.currentDestination + "~w~.", 6000);
            GameFiber.StartNew(new ThreadStart(new EManager().GenerateRandomEnemies));
            GameFiber.StartNew(new ThreadStart(new EManager().GenerateEnemiesWithZone));
            Ambulance_Escort_Bollingbrook_to_Davis.arBlip       = new Blip(DavisHospital_EMS.sPosProta);
            Ambulance_Escort_Bollingbrook_to_Davis.arBlip.Color = Color.Red;
            Ambulance_Escort_Bollingbrook_to_Davis.arBlip.EnableRoute(Color.Red);
            GameFiber.StartNew(new ThreadStart(new EManager().ExternalEvent));
            Ambulance_Escort_Bollingbrook_to_Davis.limo.IsSirenOn = true;
            if (Main.muteSirens)
            {
                Ambulance_Escort_Bollingbrook_to_Davis.limo.IsSirenSilent = true;
            }
            NativeFunction.CallByName <uint>("TASK_VEHICLE_ESCORT", new NativeArgument[]
            {
                Ambulance_Escort_Bollingbrook_to_Davis.pems_1,
                Ambulance_Escort_Bollingbrook_to_Davis.limo,
                Ambulance_Escort_Bollingbrook_to_Davis.prota,
                -1,
                21f,
                1074528293,
                6f,
                -1,
                15f
            });
            GameFiber.StartNew(new ThreadStart(new EManager().StuckVehicle));
            GameFiber.StartNew(new ThreadStart(new SCALL_Manager().DistanceWatcher_EMS));
            Ped ped = new Ped("S_M_Y_Construct_01", DavisHospital_EMS.sPosAmbulance, DavisHospital_EMS.he_ambulance);

            Game.FrameRender += EManager.Mod_Controls1;
            GameFiber.Sleep(12000);
            Game.FrameRender -= EManager.Mod_Controls1;
            while (Vector3.Distance(Game.LocalPlayer.Character.Position, DavisHospital_EMS.sPosProta) > 75f)
            {
                GameFiber.Yield();
            }
            Vehicle[] nearbyVehicles = ped.GetNearbyVehicles(14);
            try
            {
                foreach (Vehicle vehicle in nearbyVehicles)
                {
                    if (!vehicle.IsEngineOn)
                    {
                        vehicle.Delete();
                    }
                    GameFiber.Yield();
                }
            }
            catch (Exception)
            {
            }
            ped.Delete();
            while (Vector3.Distance(Game.LocalPlayer.Character.Position, DavisHospital_EMS.sPosProta) > 23f)
            {
                GameFiber.Yield();
            }
            Ambulance_Escort_Bollingbrook_to_Davis.arBlip.Delete();
            EManager.currentCallState = EManager.CallState.Parking;
            int num2 = NativeFunction.CallByName <int>("CREATE_CHECKPOINT", new NativeArgument[]
            {
                0,
                DavisHospital_EMS.sPosProta.X,
                DavisHospital_EMS.sPosProta.Y,
                DavisHospital_EMS.sPosProta.Z,
                0,
                0,
                0,
                5f,
                (int)Color.Yellow.R,
                (int)Color.Yellow.G,
                (int)Color.Yellow.B,
                30,
                0
            });

            Game.DisplaySubtitle("Park your car at the ~y~stand-by point~w~.", 5000);
            Ambulance_Escort_Bollingbrook_to_Davis.pems_1.Tasks.ParkVehicle(DavisHospital_EMS.sPosAmbulance, DavisHospital_EMS.he_ambulance);
            Game.FrameRender += EManager.Mod_Controls2;
            while (Vector3.Distance(Ambulance_Escort_Bollingbrook_to_Davis.prota.Position, DavisHospital_EMS.sPosProta) > 4f)
            {
                GameFiber.Yield();
            }
            Game.FrameRender -= EManager.Mod_Controls2;
            GameFiber.Sleep(2000);
            NativeFunction.CallByName <uint>("DELETE_CHECKPOINT", new NativeArgument[]
            {
                num2
            });
            while (Vector3.Distance(Ambulance_Escort_Bollingbrook_to_Davis.limo.Position, DavisHospital_EMS.sPosAmbulance) > 5f)
            {
                GameFiber.Yield();
            }
            Ambulance_Escort_Bollingbrook_to_Davis.pems_1.Tasks.Clear();
            Ambulance_Escort_Bollingbrook_to_Davis.pems_1.Tasks.LeaveVehicle(256);
            EManager.currentCallState = EManager.CallState.Arrived;
            Game.DisplaySubtitle("Leave the vehicle and stay close to the VIP.", 5000);
            Ambulance_Escort_Bollingbrook_to_Davis.vip.Tasks.FollowNavigationMeshToPosition(DavisHospital_EMS.wPos_prisoner, DavisHospital_EMS.he_prisoner - 180f, 0.5f).WaitForCompletion();
            Ambulance_Escort_Bollingbrook_to_Davis.vip.Delete();
            Game.DisplaySubtitle("~g~MISSION COMPLETE ~w~: You have successfully transported the injured inmate.", 5000);
            this.End();
        }
Exemple #7
0
        // Token: 0x06000001 RID: 1 RVA: 0x00002050 File Offset: 0x00000250
        public static void RequestHeli()
        {
            Backup.hasHeliBeenAffected = false;
            while (EManager.currentCallState != EManager.CallState.Arrived)
            {
                if (!Backup.hasHeliBeenAffected)
                {
                    switch (EManager.currentCall)
                    {
                    case EManager.Calls.ARCtoGOC:
                        Backup.h = new Vehicle("FROGGER", new Vector3(-285.9166f, -619.4257f, 50.05699f), 255f);
                        break;

                    case EManager.Calls.LSAtoNOO:
                    case EManager.Calls.LSAtoGAL:
                    case EManager.Calls.LSAtoUD:
                    case EManager.Calls.LSAtoMZB:
                    case EManager.Calls.NOOtoMZB:
                        goto IL_1B0;

                    case EManager.Calls.KORtoGAL:
                        Backup.h = new Vehicle("FROGGER", new Vector3(-2258.629f, 387.5014f, 188.3222f), 78.8285f);
                        break;

                    case EManager.Calls.PCALL_DWT_BBP:
                        Backup.h = new Vehicle("FROGGER", new Vector3(449.1788f, -981.1251f, 43.41048f), 50.11336f);
                        break;

                    case EManager.Calls.MZBtoNOO:
                        Backup.h = new Vehicle("FROGGER", new Vector3(-285.9166f, -619.4257f, 50.05699f), 255f);
                        break;

                    case EManager.Calls.UDPtoGOC:
                        Backup.h = new Vehicle("FROGGER", new Vector3(-285.9166f, -619.4257f, 50.05699f), 255f);
                        break;

                    case EManager.Calls.KORtoMZB:
                        Backup.h = new Vehicle("FROGGER", new Vector3(-2258.629f, 387.5014f, 188.3222f), 78.8285f);
                        break;

                    case EManager.Calls.GALtoRMS:
                        Backup.h = new Vehicle("FROGGER", new Vector3(-413.7424f, 1098.916f, 332.2538f), 345.8513f);
                        break;

                    default:
                        goto IL_1B0;
                    }
IL_1DD:
                    Backup.p = new Ped("S_M_M_Pilot_02", Backup.h.Position, 0f);
                    Backup.p.WarpIntoVehicle(Backup.h, -1);
                    GameFiber.Sleep(2000);
                    new EManager().SyncCall();
                    Backup.p.BlockPermanentEvents = true;
                    Backup.hasHeliBeenAffected    = true;
                    Backup.a        = Backup.h.AttachBlip();
                    Backup.a.Sprite = 15;
                    goto IL_250;
IL_1B0:
                    Backup.h = new Vehicle("FROGGER", new Vector3(-1070.663f, -2946.223f, 13.665f), 232.3167f);
                    goto IL_1DD;
                }
IL_250:
                GameFiber.Sleep(10000);
                try
                {
                    if (EntityExtensions.Exists(Backup.h) && Backup.h.IsValid())
                    {
                        NativeFunction.CallByName <uint>("TASK_HELI_CHASE", new NativeArgument[]
                        {
                            Backup.p,
                            EManager.vipM,
                            0f,
                            0f,
                            80f
                        });
                    }
                }
                catch (Exception)
                {
                }
                GameFiber.Yield();
            }
            NativeFunction.CallByName <uint>("TASK_HELI_MISSION", new NativeArgument[]
            {
                Backup.p,
                Backup.h,
                0,
                0,
                449.1788f,
                -981.1251f,
                43.41048f,
                4,
                20f,
                -1f,
                -1f,
                10,
                10,
                5f,
                0
            });
            Backup.h.Dismiss();
            Backup.a.Delete();
        }
Exemple #8
0
        // Token: 0x060000AD RID: 173 RVA: 0x0001496C File Offset: 0x00012B6C
        public override void Process()
        {
            base.Process();
            this.isCalloutAccepted = true;
            while (Vector3.Distance(Game.LocalPlayer.Character.Position, this.SpawnPoint) > 40f)
            {
                GameFiber.Yield();
            }
            NativeFunction.CallByName <uint>("CLEAR_ALL_HELP_MESSAGES", Array.Empty <NativeArgument>());
            if (Game.LocalPlayer.Character.IsInAnyVehicle(false))
            {
                try
                {
                    Prisoner_Transport_Vespucci_to_Bollingbrook.prota = Game.LocalPlayer.Character.CurrentVehicle;
                    goto IL_AC;
                }
                catch (Exception)
                {
                    Prisoner_Transport_Vespucci_to_Bollingbrook.prota = new Vehicle("FBI2", VespucciPolice.sPos_prota, VespucciPolice.he_prota);
                    goto IL_AC;
                }
            }
            Prisoner_Transport_Vespucci_to_Bollingbrook.prota = new Vehicle("FBI2", VespucciPolice.sPos_prota, VespucciPolice.he_prota);
IL_AC:
            if (Prisoner_Transport_Vespucci_to_Bollingbrook.prota == null || !Prisoner_Transport_Vespucci_to_Bollingbrook.prota.IsValid() || !EntityExtensions.Exists(Prisoner_Transport_Vespucci_to_Bollingbrook.prota))
            {
                Prisoner_Transport_Vespucci_to_Bollingbrook.prota = new Vehicle("FBI2", VespucciPolice.sPos_prota, VespucciPolice.he_prota);
            }
            EManager.protaM = Prisoner_Transport_Vespucci_to_Bollingbrook.prota;
            Prisoner_Transport_Vespucci_to_Bollingbrook.vip = new Ped(PCALL_Manager.pModel, VespucciPolice.wPos_prisoner, VespucciPolice.he_prisoner);
            Prisoner_Transport_Vespucci_to_Bollingbrook.vip.MakePersistent();
            this.guard1 = new Ped("S_M_M_PrisGuard_01", VespucciPolice.wPos_guard1, VespucciPolice.he_guard1);
            this.guard1.MakePersistent();
            this.guard2 = new Ped("S_M_Y_Swat_01", VespucciPolice.wPos_guard2, VespucciPolice.he_guard2);
            this.guard2.MakePersistent();
            GameFiber.StartNew(new ThreadStart(new PCALL_Manager().isVIPDead));
            this.blBlip.Delete();
            this.p_fbi1.Inventory.GiveNewWeapon(EManager.vWeaponsList.ElementAt(new Random().Next(1, EManager.vWeaponsList.Count)), 500, true);
            Prisoner_Transport_Vespucci_to_Bollingbrook.p_limo.Inventory.GiveNewWeapon(EManager.vWeaponsList.ElementAt(new Random().Next(1, EManager.vWeaponsList.Count)), 200, true);
            this.guard1.Inventory.GiveNewWeapon(EManager.vWeaponsList.ElementAt(new Random().Next(1, EManager.vWeaponsList.Count)), 200, true);
            this.guard2.Inventory.GiveNewWeapon(EManager.vWeaponsList.ElementAt(new Random().Next(1, EManager.vWeaponsList.Count)), 200, true);
            if (Prisoner_Transport_Vespucci_to_Bollingbrook.< > o__18.< > p__0 == null)
            {
                Prisoner_Transport_Vespucci_to_Bollingbrook.< > o__18.< > p__0 = CallSite <Action <CallSite, object, Ped, bool> > .Create(Binder.InvokeMember(CSharpBinderFlags.ResultDiscarded, "SetEnableHandcuffs", null, typeof(Prisoner_Transport_Vespucci_to_Bollingbrook), new CSharpArgumentInfo[]
                {
                    CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, null),
                    CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, null),
                    CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.Constant, null)
                }));
            }
            Prisoner_Transport_Vespucci_to_Bollingbrook.< > o__18.< > p__0.Target(Prisoner_Transport_Vespucci_to_Bollingbrook.< > o__18.< > p__0, NativeFunction.Natives, Prisoner_Transport_Vespucci_to_Bollingbrook.vip, true);
            Game.DisplaySubtitle("Park your car at the ~y~stand-by checkpoint~w~ and wait for the prisoner.", 5000);
            int num = NativeFunction.CallByName <int>("CREATE_CHECKPOINT", new NativeArgument[]
            {
                0,
                VespucciPolice.sPos_prota.X,
                VespucciPolice.sPos_prota.Y,
                VespucciPolice.sPos_prota.Z,
                0,
                0,
                0,
                5f,
                (int)Color.Yellow.R,
                (int)Color.Yellow.G,
                (int)Color.Yellow.B,
                30,
                0
            });

            while (Vector3.Distance(Game.LocalPlayer.Character.Position, this.SpawnPoint) > 3f)
            {
                GameFiber.Yield();
            }
            NativeFunction.CallByName <uint>("DELETE_CHECKPOINT", new NativeArgument[]
            {
                num
            });
            UI.canReturn = false;
            UI.EscortInfo();
            this.fbi1         = EManager.fbi1M;
            this.limo         = EManager.limoM;
            Game.FrameRender += PCALL_Manager.Game_FrameRenderRes;
            GameFiber.StartNew(new ThreadStart(new EManager().ManageRiskLevel));
            Game.DisplaySubtitle("Wait for the prisoner to enter the bus.", 5000);
            this.guard1.Tasks.FollowNavigationMeshToPosition(this.limo.GetOffsetPosition(new Vector3(4f, 0f, 0f)), 0.7f, this.limo.Heading, 0f);
            GameFiber.Sleep(2000);
            Prisoner_Transport_Vespucci_to_Bollingbrook.vip.Tasks.FollowNavigationMeshToPosition(this.limo.GetOffsetPosition(new Vector3(3f, 0f, 0f)), 0.7f, this.limo.Heading, 0f);
            GameFiber.Sleep(3000);
            this.guard2.Tasks.FollowNavigationMeshToPosition(this.limo.GetOffsetPosition(new Vector3(4f, 0f, 0f)), 0.7f, this.limo.Heading, 0f);
            EManager.currentCallState     = EManager.CallState.EscortInProgress;
            this.p_fbi1.RelationshipGroup = "POLICE";
            Prisoner_Transport_Vespucci_to_Bollingbrook.p_limo.RelationshipGroup = "POLICE";
            Prisoner_Transport_Vespucci_to_Bollingbrook.vip.RelationshipGroup    = "POLICE";
            this.guard1.RelationshipGroup = "POLICE";
            this.guard2.RelationshipGroup = "POLICE";
            while (Vector3.Distance(Prisoner_Transport_Vespucci_to_Bollingbrook.vip.Position, this.limo.GetOffsetPosition(new Vector3(5f, 0f, 0f))) > 15f || Vector3.Distance(this.guard1.Position, this.limo.GetOffsetPosition(new Vector3(5f, 0f, 0f))) > 15f || Vector3.Distance(this.guard2.Position, this.limo.GetOffsetPosition(new Vector3(5f, 0f, 0f))) > 15f)
            {
                GameFiber.Yield();
            }
            Prisoner_Transport_Vespucci_to_Bollingbrook.vip.Tasks.EnterVehicle(this.limo, 2).WaitForCompletion();
            Prisoner_Transport_Vespucci_to_Bollingbrook.vip.BlockPermanentEvents = true;
            this.guard1.Tasks.EnterVehicle(this.limo, 0).WaitForCompletion();
            this.guard2.Tasks.EnterVehicle(this.limo, 1).WaitForCompletion();
            GameFiber.StartNew(new ThreadStart(this.MakeGuardsFollowConvoy));
            this.limo.MakePersistent();
            this.fbi1.MakePersistent();
            Prisoner_Transport_Vespucci_to_Bollingbrook.prota.MakePersistent();
            this.b_limo        = this.limo.AttachBlip();
            this.b_fbi1        = this.fbi1.AttachBlip();
            this.b_limo.Sprite = 58;
            this.b_fbi1.Sprite = 1;
            Game.FrameRender  -= PCALL_Manager.Game_FrameRenderRes;
            Game.SetRelationshipBetweenRelationshipGroups(Prisoner_Transport_Vespucci_to_Bollingbrook.p_limo.RelationshipGroup, Game.LocalPlayer.Character.RelationshipGroup, 1);
            Game.SetRelationshipBetweenRelationshipGroups(Game.LocalPlayer.Character.RelationshipGroup, Prisoner_Transport_Vespucci_to_Bollingbrook.p_limo.RelationshipGroup, 1);
            Game.SetRelationshipBetweenRelationshipGroups("ATTACKERS", Prisoner_Transport_Vespucci_to_Bollingbrook.p_limo.RelationshipGroup, 5);
            Game.SetRelationshipBetweenRelationshipGroups("COP", this.p_fbi1.RelationshipGroup, 1);
            Game.SetRelationshipBetweenRelationshipGroups(this.p_fbi1.RelationshipGroup, "COP", 1);
            Prisoner_Transport_Vespucci_to_Bollingbrook.p_limo.CanAttackFriendlies = false;
            this.p_fbi1.CanAttackFriendlies = false;
            Game.FrameRender += PCALL_Manager.Game_FrameRender;
            Game.LogTrivial("<<<< Los Santos Protection Unit >>>> Please stay close to your team members to ensure their security.");
            Game.DisplaySubtitle("Lead the convoy to the ~r~" + EManager.currentDestination + "~w~.", 6000);
            GameFiber.StartNew(new ThreadStart(new EManager().GenerateRandomEnemies));
            GameFiber.StartNew(new ThreadStart(new EManager().GenerateEnemiesWithZone));
            Prisoner_Transport_Vespucci_to_Bollingbrook.arBlip       = new Blip(Bolingbroke.sPos_prota);
            Prisoner_Transport_Vespucci_to_Bollingbrook.arBlip.Color = Color.Red;
            Prisoner_Transport_Vespucci_to_Bollingbrook.arBlip.EnableRoute(Color.Red);
            GameFiber.StartNew(new ThreadStart(new EManager().ExternalEvent));
            this.limo.IsSirenOn = true;
            this.fbi1.IsSirenOn = true;
            if (Main.muteSirens)
            {
                this.limo.IsSirenSilent = true;
                this.fbi1.IsSirenSilent = true;
            }
            NativeFunction.CallByName <uint>("TASK_VEHICLE_ESCORT", new NativeArgument[]
            {
                Prisoner_Transport_Vespucci_to_Bollingbrook.p_limo,
                this.limo,
                Prisoner_Transport_Vespucci_to_Bollingbrook.prota,
                -1,
                21f,
                1074528293,
                6f,
                -1,
                15f
            });
            NativeFunction.CallByName <uint>("TASK_VEHICLE_ESCORT", new NativeArgument[]
            {
                this.p_fbi1,
                this.fbi1,
                this.limo,
                -1,
                22f,
                1074528293,
                7f,
                -1,
                15f
            });
            GameFiber.StartNew(new ThreadStart(new EManager().StuckVehicle));
            GameFiber.StartNew(new ThreadStart(new EManager().DistanceWatcher));
            Ped ped = new Ped("S_M_Y_Construct_01", Bolingbroke.sPos_bus, Bolingbroke.he_bus);

            Game.FrameRender += EManager.Mod_Controls1;
            GameFiber.Sleep(12000);
            Game.FrameRender -= EManager.Mod_Controls1;
            GameFiber.Sleep(20000);
            while (Vector3.Distance(Game.LocalPlayer.Character.Position, Bolingbroke.sPos_prota) > 75f)
            {
                GameFiber.Yield();
            }
            Vehicle[] nearbyVehicles = ped.GetNearbyVehicles(14);
            try
            {
                foreach (Vehicle vehicle in nearbyVehicles)
                {
                    if (!vehicle.IsEngineOn)
                    {
                        vehicle.Delete();
                    }
                    GameFiber.Yield();
                }
            }
            catch (Exception)
            {
            }
            ped.Delete();
            while (Vector3.Distance(Game.LocalPlayer.Character.Position, Bolingbroke.sPos_prota) > 60f)
            {
                GameFiber.Yield();
            }
            Prisoner_Transport_Vespucci_to_Bollingbrook.arBlip.Delete();
            EManager.currentCallState = EManager.CallState.Parking;
            int num2 = NativeFunction.CallByName <int>("CREATE_CHECKPOINT", new NativeArgument[]
            {
                0,
                Bolingbroke.sPos_prota.X,
                Bolingbroke.sPos_prota.Y,
                Bolingbroke.sPos_prota.Z,
                0,
                0,
                0,
                5f,
                (int)Color.Yellow.R,
                (int)Color.Yellow.G,
                (int)Color.Yellow.B,
                50,
                0
            });

            Game.DisplaySubtitle("Park your car at the ~y~stand-by point~w~.", 5000);
            Prisoner_Transport_Vespucci_to_Bollingbrook.p_limo.Tasks.ParkVehicle(Bolingbroke.sPos_bus, Bolingbroke.he_bus);
            try
            {
                this.p_fbi1.Tasks.ParkVehicle(Bolingbroke.sPos_riot, Bolingbroke.he_riot);
                goto IL_C0F;
            }
            catch (Exception)
            {
                Game.LogTrivial("Fbi1 couldn't park.");
                goto IL_C0F;
            }
IL_C0A:
            GameFiber.Yield();
IL_C0F:
            if (Vector3.Distance(Prisoner_Transport_Vespucci_to_Bollingbrook.prota.Position, Bolingbroke.sPos_prota) <= 4f)
            {
                GameFiber.Sleep(2000);
                NativeFunction.CallByName <uint>("DELETE_CHECKPOINT", new NativeArgument[]
                {
                    num2
                });
                while (Vector3.Distance(this.limo.Position, Bolingbroke.sPos_bus) > 5f)
                {
                    GameFiber.Yield();
                }
                Prisoner_Transport_Vespucci_to_Bollingbrook.p_limo.Tasks.Clear();
                Prisoner_Transport_Vespucci_to_Bollingbrook.p_limo.Tasks.LeaveVehicle(256);
                EManager.currentCallState = EManager.CallState.Arrived;
                Game.DisplaySubtitle("Leave the vehicle and stay close to the prisoner.", 5000);
                Prisoner_Transport_Vespucci_to_Bollingbrook.vip.Tasks.FollowNavigationMeshToPosition(Bolingbroke.wPos_prisoner, Bolingbroke.he_prisoner - 180f, 0.5f).WaitForCompletion();
                Prisoner_Transport_Vespucci_to_Bollingbrook.vip.Delete();
                Game.DisplaySubtitle("~g~MISSION COMPLETE ~w~: You have successfully transported the inmate.", 5000);
                this.End();
                return;
            }
            goto IL_C0A;
        }