Esempio n. 1
0
        public async Task OnTick()
        {
            await Task.FromResult(0);

            missionHelper.HandleMissionFailedCheck();
            if (!missionHelper.IsDeliveryTaskStarted())
            {
                if (Game.PlayerPed.CurrentVehicle == deliveryCar)
                {
                    missionHelper.CreateDeliveryTask();
                }
            }
            else
            {
                await missionHelper.HandleDeliveryDropOff();
            }
        }
Esempio n. 2
0
        public async Task OnTick()
        {
            await Task.FromResult(0);

            missionHelper.HandleMissionFailedCheck();
            if (!missionHelper.IsDeliveryTaskStarted())
            {
                if (Game.PlayerPed.CurrentVehicle == deliveryCar)
                {
                    heli = await EntityUtil.CreateVehicle(VehicleHash.Maverick, new Vector3(1509.8f, -224.2f, 892.1f), 145.3f);

                    enemyVehicles.Add(heli);
                    heliBlip        = heli.AttachBlip();
                    heliBlip.Sprite = BlipSprite.HelicopterAnimated;
                    heliBlip.Color  = BlipColor.Red;
                    Ped enemy1 = await missionHelper.CreateNeutralEnemyPed(PedHash.Korean01GMY, new Vector3());

                    enemy1.SetIntoVehicle(heli, VehicleSeat.Driver);
                    Ped enemy2 = await missionHelper.CreateNeutralEnemyPed(PedHash.KorLieut01GMY, new Vector3(), 0f, WeaponHash.AssaultRifleMk2);

                    enemy2.SetIntoVehicle(heli, VehicleSeat.LeftRear);
                    Ped enemy3 = await missionHelper.CreateNeutralEnemyPed(PedHash.Korean02GMY, new Vector3(), 0f, WeaponHash.AssaultRifleMk2);

                    enemy3.SetIntoVehicle(heli, VehicleSeat.RightRear);

                    missionHelper.CreateDeliveryTask();
                }
            }
            else
            {
                if (heli.IsDead && heliBlip.Exists())
                {
                    heliBlip.Delete();
                }

                await missionHelper.HandleDeliveryDropOff();
            }
        }
        public async Task OnTick()
        {
            await Task.FromResult(0);

            missionHelper.HandleMissionFailedCheck();
            if (!missionHelper.IsDeliveryTaskStarted())
            {
                if (!API.IsPauseMenuActive())
                {
                    BaseScript.TriggerEvent("mtracker:start");
                }
                if (Game.PlayerPed.CurrentVehicle == deliveryCar)
                {
                    BaseScript.TriggerEvent("mtracker:removealltargets");
                    BaseScript.TriggerEvent("mtracker:stop");
                    Game.Player.WantedLevel = 3;
                    missionHelper.CreateDeliveryTask();
                }
            }
            else
            {
                await missionHelper.HandleDeliveryDropOff();
            }
        }