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.

Override Persuit Flee

Featured Replies

Hey All,

 

Whenever I call AddPedToPersuit(), the suspect seems to flee, despite any Task I call after that (including Suspect.Tasks.StandStill(30000)).

 

I'm trying to tell the suspect to continue their FightAgainstClosestHatedTarget, but it seems to get overridden. I want to add them to the persuit so that I can call Helicopter, FBI, etc via the Persuit Backup Menu.

 

Any thoughts on how I can override the flee behavior of suspects when they've been added to a persuit?

 

Code snippet:

public override void Process()
        {
            base.Process();


            if (!PursuitCreated && Game.LocalPlayer.Character.DistanceTo(Suspect.Position) < 30f)
            {
                Game.LogTrivial("Getting them to fight");
                Suspect.Tasks.FightAgainstClosestHatedTarget(50f);

                foreach (Ped bystandard in bystandards)
                {
                    bystandard.Tasks.ReactAndFlee(Suspect);
                }

                Game.LogTrivial("Creating persuit");
                Pursuit = Functions.CreatePursuit();
                Functions.AddPedToPursuit(Pursuit, Suspect);
                Functions.SetPursuitIsActiveForPlayer(Pursuit, true);
                PursuitCreated = true;

                Game.LogTrivial("Attempt to fight again... debugging");
                Suspect.Tasks.FightAgainstClosestHatedTarget(50f);
            }
}

 

Edited by dylanlive
add code

LSPDFR aggressively resets and re-applies its own tasks to peds every 2000ms during a pursuit. You can try also aggressively resetting and re-applying your tasks, but basically it'll probably still be a mess unless this app ever makes it back from the depths of abandonware.

My YouTube Channel: Darkmyre Gaming (Australian LSPDFR patrols, plugins in development, and other games)

My Discord Server | AusGamer Network

 

Please do not PM me for technical support or bug reports, use the appropriate forum or plugin's comments instead.

  • Author

Ah, I guess I can understand. I'd imagine this is for the logic of running, surrendering, etc.

 

I'm trying to recall how the Gang Fight callouts currently work. Are the suspects marked with a blip, but not technically marked for pursuit? That said, you can't call pursuit backup?

 

Ultimately I'm just trying to allow the user to access the helicopters - perhaps I'll play with writing this logic in RPH independent of LSPDFR's pursuit.

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...

Similar Content

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.