Jump to content

[SOLVED] How to recognize the end of an AiOfficers arrest?


ziipzaaapM16A4

Recommended Posts

So this is a very simple code snippet.

 

My question is:

How can i detect after an pursuit if the officers are still handling the arrest?

var Pursuit = LSPDFR_Functions.CreatePursuit();
LSPDFR_Functions.AddPedToPursuit(Pursuit, Suspects[0]);
while (LSPDFR_Functions.IsPursuitStillRunning(Pursuit)) { GameFiber.Sleep(1000); }
//ISSUE: Officers & Peds get dismissed before the Arrest is fullfilled.
//dismissing all suspects and officers

 

Edited by ziipzaaapM16A4

Take a look at my Plugins:

AmbientAICallouts: Ai get calls too. Callouts can turn into a backup request for the player [YouTube Link]

Search Vehicle Plugin: Simple and more Immersive Vehicle Search Plugin [YouTube Link]

What Was You Name Again?: Get the name of a Suspect even when arrested and placed in your Vehicle [YouTube Link]
Corpse Inspection:  Investigate the corpse. Interact and search for details in a more Cinematic way  [YouTube Link]
[WIP] EnvoirementalCallouts: A couple of Callouts and WorldEvents that are likely to happen to you while you're on duty [Youtube Link]

[OnHold] EMS Support: Be the First Responder of Medical Emergency's and do CPR on Patients [YouTube Link]

 

spacer.png

Checkout my Patreon for Early Access to my mods                                       checkout my Discord Server

Link to comment
Share on other sites

Might check out Functions.IsPedGettingArrested and Functions.GetPedArrestingOfficer.  My thought would be that while the first function is true, the second function won't be null, so while A is true and B is not null, an arrest is still being handled.

Released plugins

Automatic Siren Cutout | Rich's Police EnhancementsScene Manager | Rich Ambiance

Retired - No more updates

Link to comment
Share on other sites

On 11/17/2020 at 1:59 PM, Rich said:

Might check out Functions.IsPedGettingArrested and Functions.GetPedArrestingOfficer.  My thought would be that while the first function is true, the second function won't be null, so while A is true and B is not null, an arrest is still being handled.

That doesn't work. 
Function IsPedGettingArrested is sadly just holding on for the time of the handcuff and standing up. Which means its not even longer than IsPursuitStillRunning.
I want to get false or true when the suspect has been placed in a police vehicle. 

Edited by ziipzaaapM16A4

Take a look at my Plugins:

AmbientAICallouts: Ai get calls too. Callouts can turn into a backup request for the player [YouTube Link]

Search Vehicle Plugin: Simple and more Immersive Vehicle Search Plugin [YouTube Link]

What Was You Name Again?: Get the name of a Suspect even when arrested and placed in your Vehicle [YouTube Link]
Corpse Inspection:  Investigate the corpse. Interact and search for details in a more Cinematic way  [YouTube Link]
[WIP] EnvoirementalCallouts: A couple of Callouts and WorldEvents that are likely to happen to you while you're on duty [Youtube Link]

[OnHold] EMS Support: Be the First Responder of Medical Emergency's and do CPR on Patients [YouTube Link]

 

spacer.png

Checkout my Patreon for Early Access to my mods                                       checkout my Discord Server

Link to comment
Share on other sites

16 minutes ago, Rich said:

So just check if the suspect is in a police vehicle, then?

oh... yes.
you're right. i totally forgot that i can ask the other way too.
not only asking for the occupants of a vehicle. 

suspects[0].IsInAnyPoliceVehicle;


Sorry. 🤦‍♂️

Edited by ziipzaaapM16A4

Take a look at my Plugins:

AmbientAICallouts: Ai get calls too. Callouts can turn into a backup request for the player [YouTube Link]

Search Vehicle Plugin: Simple and more Immersive Vehicle Search Plugin [YouTube Link]

What Was You Name Again?: Get the name of a Suspect even when arrested and placed in your Vehicle [YouTube Link]
Corpse Inspection:  Investigate the corpse. Interact and search for details in a more Cinematic way  [YouTube Link]
[WIP] EnvoirementalCallouts: A couple of Callouts and WorldEvents that are likely to happen to you while you're on duty [Youtube Link]

[OnHold] EMS Support: Be the First Responder of Medical Emergency's and do CPR on Patients [YouTube Link]

 

spacer.png

Checkout my Patreon for Early Access to my mods                                       checkout my Discord Server

Link to comment
Share on other sites

  • The title was changed to [SOLVED] How to recognize the end of an AiOfficers arrest?
7 hours ago, Rich said:

So just check if the suspect is in a police vehicle, then?

but then it would never become true when the suspect escaped.

 

i mean i could setup an event if the suspect gets lost. checking the event. if the event is true then not executute the wait timer until the suspect is in a vehicle.

but i didn't saw any options to specify which ped escaped.

 

EDIT:
i think i found an event which gives me everything i need.

Edited by ziipzaaapM16A4

Take a look at my Plugins:

AmbientAICallouts: Ai get calls too. Callouts can turn into a backup request for the player [YouTube Link]

Search Vehicle Plugin: Simple and more Immersive Vehicle Search Plugin [YouTube Link]

What Was You Name Again?: Get the name of a Suspect even when arrested and placed in your Vehicle [YouTube Link]
Corpse Inspection:  Investigate the corpse. Interact and search for details in a more Cinematic way  [YouTube Link]
[WIP] EnvoirementalCallouts: A couple of Callouts and WorldEvents that are likely to happen to you while you're on duty [Youtube Link]

[OnHold] EMS Support: Be the First Responder of Medical Emergency's and do CPR on Patients [YouTube Link]

 

spacer.png

Checkout my Patreon for Early Access to my mods                                       checkout my Discord Server

Link to comment
Share on other sites

  • The title was changed to [SOLVED] How to recognize the end of an AiOfficers arrest?

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