Jump to content

Check if suspect is dead & run Audio twice


AdirB

Recommended Posts

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! :)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 :)

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