Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

When I pull over ped,LEPDFR will crash

Featured Replies

I make a callout,but have problem

When I pull over ped,LEPDFR will crash

Below is my code:

Spoiler

namespace Taiwanese_Callout.Callouts
{
    [CalloutInfo("攔查車輛", CalloutProbability.Medium)]
    class StopTheVehicle : Callout
    {
        public LHandle pursuit;
        public Vector3 SpawnPoint;
        public Vector3 SpawnPoint1;
        public Blip blip;
        public Ped Suspect;
        public Vehicle Vehicle;
        public VehicleDrivingFlags flags;
        public override bool OnBeforeCalloutDisplayed()
        {
            SpawnPoint = World.GetNextPositionOnStreet(Game.LocalPlayer.Character.Position.Around(200f));
            SpawnPoint1 = World.GetRandomPositionOnStreet();
            Model[] VehicleModels = new Model[]
            {
                "NINFEF2", "COACH", "AIRBUS", "AMBULANCE", "BARRACKS", "BARRACKS2", "BALLER", "BALLER2", "BANSHEE", "BJXL", "BENSON", "BOBCATXL", "BUCCANEER", "BUFFALO", "BUFFALO2", "BULLDOZER", "BULLET", "BURRITO", "BURRITO2", "BURRITO3", "BURRITO4", "BURRITO5", "CAVALCADE", "CAVALCADE2", "POLICET", "GBURRITO", "CAMPER", "CARBONIZZARE", "CHEETAH", "COMET2", "COGCABRIO", "COQUETTE", "GRESLEY", "DUNE2", "HOTKNIFE", "DUBSTA", "DUBSTA2", "DUMP", "DOMINATOR", "EMPEROR", "EMPEROR2", "EMPEROR3", "ENTITYXF", "EXEMPLAR", "ELEGY2", "F620", "FBI", "FBI2", "FELON", "FELON2", "FELTZER2", "FIRETRUK", "FQ2", "FUGITIVE", "FUTO", "GRANGER", "GAUNTLET", "HABANERO", "INFERNUS", "INTRUDER", "JACKAL", "JOURNEY", "JB700", "KHAMELION", "LANDSTALKER", "MESA", "MESA2", "MESA3", "MIXER", "MINIVAN", "MIXER2", "MULE", "MULE2", "ORACLE", "ORACLE2", "MONROE", "PATRIOT", "PBUS", "PACKER", "PENUMBRA", "PEYOTE", "POLICE", "POLICE2", "POLICE3", "POLICE4", "PHANTOM", "PHOENIX", "PICADOR", "POUNDER", "PRANGER", "PRIMO", "RANCHERXL", "RANCHERXL2", "RAPIDGT", "RAPIDGT2", "RENTALBUS", "RUINER", "RIOT", "RIPLEY", "SABREGT", "SADLER", "SADLER2", "SANDKING", "SANDKING2", "SHERIFF", "SHERIFF2", "SPEEDO", "SPEEDO2", "STINGER", "STOCKADE", "STINGERGT", "SUPERD", "STRATUM", "SULTAN", "AKUMA", "PCJ", "FAGGIO2", "DAEMON", "BATI2"
            };
            Vehicle = new Vehicle(VehicleModels[new Random().Next(VehicleModels.Length)], SpawnPoint);
            Vehicle.IsPersistent = true;
            Suspect = new Ped(SpawnPoint);
            Suspect.WarpIntoVehicle(Vehicle, -1);
            Suspect.IsPersistent = true;
            if (!Suspect.Exists())
                return false;
            this.ShowCalloutAreaBlipBeforeAccepting(SpawnPoint, 30f);
            this.AddMinimumDistanceCheck(15f, SpawnPoint);
            this.CalloutMessage = "攔查車輛";
            this.CalloutPosition = SpawnPoint;
            Functions.PlayScannerAudioUsingPosition("OFFICERS_REPORT CRIME_RESIST_ARREST IN_OR_POSITION", this.SpawnPoint);
            return base.OnBeforeCalloutDisplayed();
        }
        public override bool OnCalloutAccepted()
        {
            blip = Suspect.AttachBlip();
            Game.DisplaySubtitle("攔查車輛", 8000);
            flags = (VehicleDrivingFlags)183;
            Suspect.Tasks.DriveToPosition(Vehicle,SpawnPoint1,40,flags,100);
            this.pursuit = Functions.CreatePursuit();
            return base.OnCalloutAccepted();
        }
        public override void OnCalloutNotAccepted()
        {
            base.OnCalloutNotAccepted();
            if (Suspect.Exists())
                Suspect.Delete();
            if (blip.Exists())
                blip.Delete();
        }
        public override void Process()
        {
            Boolean a = true; 
            if (Functions.IsPlayerPerformingPullover() == true)
            {
                if (a == true)
                {
                    for(int i=0; i<1;i++)
                    {
                        Suspect.BlockPermanentEvents = true;
                        Functions.AddPedToPursuit(this.pursuit, Suspect);
                        Functions.SetPursuitIsActiveForPlayer(this.pursuit, true);
                        Game.DisplayNotification("追捕犯人");
                        a = false;
                    }
                }
            }
            base.Process();
            if (Suspect.IsCuffed == true && Suspect.IsDead != true)
            {
                Game.DisplaySubtitle("追捕結束,嫌犯已逮捕", 7000);
                Functions.PlayScannerAudio("WE_ARE_CODE_4 NO_FURTHER_UNITS_REQUIRED");
                End();
            }
            if (Suspect.IsCuffed != true && Suspect.IsDead == true)
            {
                Game.DisplaySubtitle("追捕結束,嫌犯已死亡", 7000);
                Functions.PlayScannerAudio("WE_ARE_CODE_4 NO_FURTHER_UNITS_REQUIRED");
                End();
            }
        }
        public override void End()
        {
            if (Suspect.Exists())
                Suspect.Dismiss();
            if (blip.Exists())
                blip.Delete();
            base.End();
        }
    }
}

I think process have problem,but I don't know where it is

please help me,thx

  • Author
28 minutes ago, Rich said:

You don't, but look at your crash in the log next time.

RPH.log write

[2/6/2021 8:30:19 PM.234] LSPD First Response: [TRACE] TaskEvadeCopsAdvInVehicle::OnAbort
[2/6/2021 8:30:19 PM.234] LSPD First Response: [TRACE] Suspect freed
[2/6/2021 8:30:21 PM.472] LSPD First Response: [TRACE] Aborting EvadeCops: Freeing suspect
[2/6/2021 8:30:21 PM.472] LSPD First Response: [TRACE] Aborting EvadeCopsInVehicle: Aborting main task

The above text has been repeated,and then it crashes

It is the log

RagePluginHook.log

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.