Esempio n. 1
0
 public void StartEntry(int entryPoint, Ped[] team)
 {
     float heading = 0f;
     switch (entryPoint)
     {
         case 0: // Water
             var entryPos = new Vector3(3098.805f, -4801.487f, 2.037071f);
             heading = 14.18145f;
             Ped lastped = new Ped(0);
             for (int index = 0; index < team.Length; index++)
             {
                 team[index].Position = entryPos;
                 if (lastped.Exists()) team[index].Position -= lastped.ForwardVector*2;
                 team[index].Heading = heading;
                 lastped = team[index];
             }
             var enforcermodel = new Model(VehicleHash.Dinghy2);
             enforcermodel.Request(10);
             var enforcer = World.CreateVehicle(enforcermodel, new Vector3(3094.513f, -4802.502f, 0.1324978f), 15.62522f);
             CleanupBag.Add(enforcer);
             EntryComplete = true;
             break;
         case 1: // Plane
             planeEntry = new PlaneEntry(new Vector3(-1598.288f, -2992.517f, 14.87434f), 241.2218f, new Vector3(2541.847f, -3829.26f, 115.3642f),
                 new Vector3(3002.718f, -4602.471f, 15.26161f), new Vector3(3049.975f, -4704.251f, 15.25679f));
             foreach (Ped ped in team)
             {
                 planeEntry.AddPassenger(ped);
             }
             planeEntry.Start();
             break;
         case 2: // Rappel
             Vector3[] rappelpads = new[]
             {
                 new Vector3(-1114.415f, -2884.573f, 14.04894f),
                 new Vector3(-1145.432f, -2864.025f, 14.05568f),
             };
             for (int i = 0; i < Convert.ToInt32(team.Length/2); i++)
             {
                 var rappel = new RappelEntry(rappelpads[i], new Vector3(3079.936f, -4649.66f, 23.87023f));
                 var team2 = team.Reverse().ToList();
                 for (int d = 0 + (2*i); d < 2 + (2*i); d++)
                 {
                     Ped t = team2[d];
                     rappel.AddPassenger(t);
                 }
                 rappelUpdates.Add(rappel);
             }
             break;
     }
 }
Esempio n. 2
0
        public void StartEntry(int entryPoint, Ped[] team)
        {
            switch (entryPoint)
            {
                case 0: //boat
                    BadGuys[BadGuys.Count-1].Character.Delete();
                    BadGuys.RemoveAt(BadGuys.Count-1);

                    var boatModel = new Model(VehicleHash.Dinghy2);
                    int counter = 0;
                    do
                    {
                        boatModel.Request();
                        //Script.Yield();
                        counter++;
                    } while (!boatModel.IsLoaded && counter < 2000);

                    var boat = World.CreateVehicle(boatModel, new Vector3(-2015.075f, -1040.253f, 0.5699487f), 341.2882f);
                    boat.MarkAsNoLongerNeeded();
                    boat.FreezePosition = true;
                    CleanupBag.Add(boat);
                    foreach (Ped t in team)
                    {
                        t.Position = new Vector3(-2015.249f, -1041.006f, 2.072449f);
                        t.Heading = 63.90365f;
                    }
                    EntryComplete = true;
                    break;
                case 1: // Rappel
                    for (int i = 0; i < Convert.ToInt32(team.Length/2); i++)
                    {
                        var rappel = new RappelEntry(new Vector3(-1492.215f, -1230.166f, 2.87f).Around(20f), new Vector3(-2109.796f, -1009.942f, 22.83442f));
                        var team2 = team.Reverse().ToList();
                        for (int d = 0 + (2*i); d < 2 + (2*i); d++)
                        {
                            Ped t = team2[d];
                            rappel.AddPassenger(t);
                        }
                        rappelUpdates.Add(rappel);
                    }
                    break;

            }
        }
Esempio n. 3
0
        public void StartEntry(int entryPoint, Ped[] team)
        {
            switch (entryPoint)
            {
                case 0: // Rappel
                    Vector3[] helipads = new[]
                    {
                        new Vector3(311.313f, -1466f, 46.9f),
                        new Vector3(299.75f, -1453f, 46.9f),
                    };
                    for (int i = 0; i < Convert.ToInt32(team.Length/2); i++)
                    {
                        var rappel = new RappelEntry(helipads[i], new Vector3(-92.5652f, -2362.343f, 31.9f));
                        var team2 = team.Reverse().ToList();
                        for (int d = 0 + (2*i); d < 2 + (2*i); d++)
                        {
                            Ped t = team2[d];
                            rappel.AddPassenger(t);
                        }
                        rappelUpdates.Add(rappel);
                    }
                    break;
                case 1: //boat
                    BadGuys[BadGuys.Count-1].Character.Delete();
                    BadGuys.RemoveAt(BadGuys.Count-1);

                    var boatModel = new Model(VehicleHash.Dinghy2);
                    int counter = 0;
                    do
                    {
                        boatModel.Request();
                        Script.Yield();
                        counter++;
                    } while (!boatModel.IsLoaded && counter < 2000);

                    var boat = World.CreateVehicle(boatModel, new Vector3(-253.971f, -2367.186f, -0.89f), 185.44f);
                    boat.MarkAsNoLongerNeeded();
                    CleanupBag.Add(boat);

                    foreach (Ped t in team)
                    {
                        t.Position = new Vector3(-249.4635f, -2366.84f, 9.319f);
                        t.Heading = -180f;
                    }
                    EntryComplete = true;
                    break;

            }
        }
Esempio n. 4
0
        public void StartEntry(int entryPoint, Ped[] team)
        {
            float heading = 0f;
            switch (entryPoint)
            {
                case 0: // Front
                    var entryPos = new Vector3(-1793.309f, -1196.424f, 12.017f);
                    heading = 51.61f;
                    Ped lastped = new Ped(0);
                    for (int index = 0; index < team.Length; index++)
                    {
                        team[index].Position = entryPos;
                        if (lastped.Exists()) team[index].Position -= lastped.ForwardVector*2;
                        team[index].Heading = heading;
                        lastped = team[index];
                    }
                    var enforcermodel = new Model(VehicleHash.Riot);
                    enforcermodel.Request(10);
                    var enforcer = World.CreateVehicle(enforcermodel, new Vector3(-1794.152f, -1188.071f, 12.74f), 9.35f);
                    enforcer.SirenActive = true;
                    enforcer.OpenDoor(VehicleDoor.BackLeftDoor, false, true);
                    enforcer.OpenDoor(VehicleDoor.BackRightDoor, false, true);
                    CleanupBag.Add(enforcer);
                    EntryComplete = true;
                    break;
                case 1: // Water
                    var model = new Model(VehicleHash.Predator);
                    model.Request(10);
                    var car = World.CreateVehicle(model, new Vector3(-1799.512f, -1230.37f, 0.568f), 139.47f
                        );
                    CleanupBag.Add(car);

                    entryPos = new Vector3(-1800.013f, -1227.414f, 1.66f);
                    heading = 149.15f;
                    foreach (Ped ped in team)
                    {
                        ped.Position = entryPos;
                        ped.Heading = heading;
                    }
                    EntryComplete = true;
                    break;
                case 2: // Rappel
                    for (int i = 0; i < Convert.ToInt32(team.Length/2); i++)
                    {
                        var rappel = new RappelEntry(new Vector3(-1492.215f, -1230.166f, 2.87f).Around(20f), new Vector3(-1837.12f, -1254.43f, 20.18f));
                        var team2 = team.Reverse().ToList();
                        for (int d = 0 + (2*i); d < 2 + (2*i); d++)
                        {
                            Ped t = team2[d];
                            rappel.AddPassenger(t);
                        }
                        rappelUpdates.Add(rappel);
                    }
                    break;
            }
        }