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.

Vanilla Arrest function handling with StopThePed

Featured Replies

Hopefully some LSPDFR dev or someone who overcame this problem is able to help me.

 

For my plugin, I've set up an arrest animation and I'm using Functions.SetPedAsArrested(target, true, true) once the animation is finish to actually cuff the ped and let LSPDFR handle the rest. The issue comes in correlation with Stop The Ped.

 

The vanilla arrest function -> Aiming a gun at the ped -> holding E for the LSPDFR arrest animation where the ped goes on the ground -> player proceeds to the ped and holds E again to arrest the ped -> if I use this, STP will recognize the ped as arrested and thus allowing me to open the menu to Frisk the Ped, grab the ped, call for transport etc.

 

If I set the ped as arrested Functions.SetPedAsArrested(target, true, true), this does not happen. In fact STP doesn't even recognize the Ped anymore and wont allow me to stop the ped at all.

 

This is a bit weird to me because IsPedArrested returns true in both cases so there must be something inside the vanilla arrest function that triggers STP but isn't in the API function. Is there any bool or Metadata that is being set within the animation function but absent from the API function?

 

 

On a little sidenote: Functions.SetPedAsStopped DOES work for STP, however this way STP doesn't recognizes the ped as cuffed/arrested and opens the normal menu that is missing the "Uncuff, call for transport etc." options. It also removes the handcuff task which kinda kills the purpose of my plugin.

On 1/5/2024 at 12:25 AM, RicyVasco said:

In fact STP doesn't even recognize the Ped anymore

This is a STP issue. STP dev bejo did not take default Functions in consideration, so some LSPDFR methods as well as Functions simply conflict with STP.
The only way out of that is to not use STP

See my plugin here:
https://www.youtube.com/watch?v=peqSXuTfIyY

Let me know if you find it interesting.
Best Regards.

  • Management Team

They should be the same, especially the way you are calling it as it also fires the associated events. Perhaps the plugin is doing some additional tracking beforehand, such as monitoring peds that are being aimed at?

Please do not PM me unless really necessary (knowing you helps). If you think you need my attention in a topic, tag me.

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.