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 ped is arrested by another cop ped

Featured Replies

Hello,
I have created a callout and every end method I gave it works fine, except the method when another cop arrests the suspects and than comes the transport.

The method is actually working great, the callout ends but I don't get a notification says that the suspects are in custody.

I do get a notification when I make the arrest.

            if (Functions.IsPedArrested(SuspectA) && Functions.IsPedArrested(SuspectB) && !Functions.IsPursuitStillRunning(Pursuit))
            {
                Game.DisplayNotification("Distpach, suspects are in custody. Resuming Patrol.");
                Functions.PlayScannerAudio("10_15_SUSPECT_IN_CUSTODY 10-4_COPY");
                End();
            }

So I assume that IsCuffed is only when the player is making the arrest.
What can I do to end the callout properly when others arrests the suspect?
EDIT: Fixed above by changing SuspectA.IsCuffed to Functions.IsPedArrested(SuspectA)

I also have another problem with callouts.
When in a pursuit after a suspect and when I press X the callout ends but the entities are not being removed, even the blips.
It happens only when I'm in a pursuit with my callouts, I know because I tried to press X when not in a pursuit and it does delete everything.
So it's only happens when in pursuit. Do I need to add somethign additional to make the callout terminate itself when pressing X in a pursuit?

Thanks :)

Edited by AdirB

6 hours ago, AdirB said:

I also have another problem with callouts.
When in a pursuit after a suspect and when I press X the callout ends but the entities are not being removed, even the blips.
It happens only when I'm in a pursuit with my callouts, I know because I tried to press X when not in a pursuit and it does delete everything.
So it's only happens when in pursuit. Do I need to add somethign additional to make the callout terminate itself when pressing X in a pursuit?

Thanks :)

You'll need to make sure all of your cleanup code is in End, then it'll get called whenever your callout ends for any reason.

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
19 minutes ago, Darkmyre said:

You'll need to make sure all of your cleanup code is in End, then it'll get called whenever your callout ends for any reason.

It does in End().

        public override void End()
        {
            Game.LogTrivial("callout is ended and entities removed.");
            base.End();
            if (MaleBanker.Exists()) { MaleBanker.Dismiss(); } if (FemaleBanker.Exists()) { FemaleBanker.Dismiss(); }
            if (SuspectA.Exists()) { SuspectA.Dismiss(); } if (SuspectBlipA.Exists()) { SuspectBlipA.Delete(); }
            if (SuspectB.Exists()) { SuspectB.Dismiss(); } if (SuspectBlipB.Exists()) { SuspectBlipB.Delete(); }
            if (SceneIndicator.Exists()) { SceneIndicator.Delete(); }
            Game.LogTrivial("callout entities are removed.");
        }

 

Edited by AdirB

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.