Jump to content

Vanilla Arrest function handling with StopThePed


Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...