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.

Checking if ped has been isued warning

Featured Replies

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!

Everyone wants happiness, no one wants pain. But you can't have a rainbow, without a little rain.

  • Author
1 minute ago, LMS said:

Is this during a traffic stop or when stopping a ped on foot?

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.

Everyone wants happiness, no one wants pain. But you can't have a rainbow, without a little rain.

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

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

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.