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.

Playing Scanner Audio with LSPDFR API

Featured Replies

I'm currently working on a plugin using the LSPDFR API but am having trouble with the scanner audio.

Functions.PlayScannerAudio("NEED_BACKUP_NOW")
GameFiber.Sleep(3000)
Functions.PlayScannerAudioUsingPosition("ATTENTION_ALL_UNITS ASSISTANCE_REQUIRED IN_OR_ON_POSITION CODE_3", Game.LocalPlayer.Character.Position);

The problem is, the first audio: "NEED_BACKUP_NOW", plays perfectly, but the second piece of audio doesn't play. The rest of the script executes perfectly, and it appears that the second audio statement is skipped.

Does anyone have any experience with this?

Probably the problem is that LSPDFR can only play one audio at once. When the second audio should start, the first audio might still playing. You can either make the sleep time bigger or simulate the sounds between one audio and other in only one PlayScannerAudio() like I did:

Functions.PlayScannerAudioUsingPosition(
"CRIME_OFFICER_REQUESTS_AIR_SUPPORT IN_OR_ON_POSITION OUTRO/*Here you play the outro audio and then the intro audio*/ OFFICER_INTRO HELI_APPROACHING_DISPATCH", Game.LocalPlayer.Character.Position);

Edited by alexguirre

  • Author

Probably the problem is that LSPDFR can only play one audio at a time. When the second audio should start, the first audio might still playing. You can either make te sleep time bigger or simulate the sounds between one audio and other in only one PlayScannerAudio() like I did:

Functions.PlayScannerAudioUsingPosition("CRIME_OFFICER_REQUESTS_AIR_SUPPORT IN_OR_ON_POSITION OUTRO/*Here you play the outro audio and then the intro audio*/ OFFICER_INTRO HELI_APPROACHING_DISPATCH", Game.LocalPlayer.Character.Position);

Hmmmm... That's a surprise because the first audio is less than 3 seconds long, but I'll give it a try and get back to you.

Thanks for your help.

Hmmmm... That's a surprise because the first audio is less than 3 seconds long, but I'll give it a try and get back to you.

Thanks for your help.

Remember that LSPDFR adds more audios, like the INTRO, the OUTRO or the NOISE_LOOP, so it makes it longer.

Edited by alexguirre

  • Author

Remember that LSPDFR adds more audios, like the INTRO, the OUTRO or the NOISE_LOOP, so it makes it longer.

That's probably what it was. Increasing the sleep time solved the problem.

Another quick question, do you know how to add the Key icons to the dialogues? Such as:

Game.DisplayHelp("Press F10 to continue.", true);

But instead of displaying just the text F10, it instead displays the actual graphic for that button? 

Edited by AlconH

That's probably what it was. Increasing the sleep time solved the problem.

Another quick question, do you know how to add the Key icons to the dialogues? Such as:

Game.DisplayHelp("Press F10 to continue.", true);

But instead of displaying just the text F10, it instead displays the actual graphic for that button? 

Look at this topic in gtaforums: http://gtaforums.com/topic/808173-list-of-input-names/?hl=input

As you can see it uses the game controls and the problem with that is that if the user changes the game keys, the key icon also will change. And I don't know if there is any control that uses  the F10 key by default. That's the only method I know of.

  • Author

Look at this topic in gtaforums: http://gtaforums.com/topic/808173-list-of-input-names/?hl=input

As you can see it uses the game controls and the problem with that is that if the user changes the game keys, the key icon also will change. And I don't know if there is any control that uses  the F10 key by default. That's the only method I know of.

Ah damn. That's a shame. Thanks anyway.

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.