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.

Check if suspect is dead & run Audio twice

Featured Replies

Hello, I started to learn LSPDFR API yesterday, I'm trying to check if the suspect is dead and if he is, the dispatcher will say "Suspect is neutralized" and then she will say "10-4, copy that".

I understand that to do it I need to play 2 defferent files in two seperate function lines but I kinda mess it around.

if (PursuitCreated && !Functions.IsPursuitStillRunning(Pursuit))
            {
                Game.DisplayNotification("Distpach, suspect is under custody. Resuming Patrol.");
				Functions.PlayScannerAudio("SUSPECT_IN_CUSTODY");
				GameFiber.Sleep(4000);
                Functions.PlayScannerAudio("10-4");
                End();
            }

if (PursuitCreated && Suspect.IsDead(Pursuit))
            {
                Game.DisplayNotification("Distpach, suspect is neutralized. Resuming Patrol.");
				Functions.PlayScannerAudio("SUSPECT_NEUTRALIZED");
				GameFiber.Sleep(4000);
                Functions.PlayScannerAudio("10-4");
                End();
            }

The problem is when the suspect's dead it plays the first dispatch and then the second, but the second's kinda repeating himself all over endless.

Also, I receive the custody notification.

I don't know why, I'd aperciate if someone helps me.

Thanks in advance! :)

If you want to play two sounds behind each other. Just:

Functions.PlayScannerAudio("SUSPECT_NEUTRALIZED 10-4");

 Thus, only the first is played and then the second. Or this by more than two sounds

Functions.PlayScannerAudio("SUSPECT_NEUTRALIZED 10-4 ... ... ... ...");
I hope this answers your question

Edited by Anarchiyx3

Yeeeah

  • Author
7 hours ago, Anarchiyx3 said:

If you want to play two sounds behind each other. Just:


Functions.PlayScannerAudio("SUSPECT_NEUTRALIZED 10-4");

 Thus, only the first is played and then the second. Or this by more than two sounds


Functions.PlayScannerAudio("SUSPECT_NEUTRALIZED 10-4 ... ... ... ...");
I hope this answers your question

Thanks, I solved it myself before :)

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.