Jump to content
SneakySteve

Checking if ped has been isued warning

Recommended Posts

I'm working on my callouts plugin and I need to know when to call End();

 

Currently, I have the following

 

if (Game.LocalPlayer.Character.IsDead || Suspect.IsDead || Suspect.IsCuffed)

{

        End();

}

 

I want to know how to add another OR check into that if statement for what if the player simply dismisses the ped/issues them a warning?

 

Thanks in advance!

Share this post


Link to post
Share on other sites
15 hours ago, SneakySteve said:

On foot, if the player says "Issues warning" I want to be able to detect that, having the ability to detect it for StopThePed would be nice also.

 

i don't think LSPDFR has API or published event for that

Share this post


Link to post
Share on other sites

You should be able to detect this by waiting until Functions.IsPedStoppedByPlayer returns false (run this check in a separate thread). This won't work correctly with StopThePed since it uses its own functions and not the LSPDFR API. StopThePed might offer other functions through its own API for you to integrate.

 

Example untested module that you can expand on:

https://gist.githubusercontent.com/RiverGrande/712b8678baf6b6365ffa8e9c56b63134/raw/dae92b3542fdb43a0b77b006bd84a489840767ec/WaitForDismissal

Edited by liverlande

Share this post


Link to post
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...