Exemple #1
0
        public void Delete()
        {
            if (AI != null)
            {
                AI.AbortAllTasks();
            }

            if (isRespondingVehicleBlip)
            {
                isRespondingVehicleBlip.Delete();
                isRespondingVehicleBlip = null;
            }

            if (VehicleBlip)
            {
                VehicleBlip.Delete();
                VehicleBlip = null;
            }

            if (Vehicle)
            {
                Vehicle.Delete();
                Vehicle = null;
            }

            if (Peds != null)
            {
                foreach (AdvancedPed a in Peds)
                {
                    if (a.Ped)
                    {
                        a.Ped.Delete();
                    }
                }
                Peds = null;
            }

            IsResponding = false;

            DeleteInternal();

            IsCreated            = false;
            IsDismissedOrDeleted = true;
        }
Exemple #2
0
        public void Dismiss()
        {
            if (isRespondingVehicleBlip)
            {
                isRespondingVehicleBlip.Delete();
                isRespondingVehicleBlip = null;
            }

            if (VehicleBlip)
            {
                VehicleBlip.Delete();
                VehicleBlip = null;
            }

            if (Vehicle)
            {
                Vehicle.Dismiss();
            }

            if (Peds != null)
            {
                foreach (AdvancedPed a in Peds)
                {
                    if (a.Ped)
                    {
                        a.Ped.Dismiss();
                    }
                }
            }

            IsResponding = false;

            DismissInternal();

            IsDismissedOrDeleted = true;
        }