PlaySoundFrontend

So this works:

PlaySoundFrontend(-1, "TIMER_STOP", "HUD_MINI_GAME_SOUNDSET", 1)

but I want to play the file located in x64/audio/sfx/POLICE_SCANNER.rpf
Specifically: 01_officer_requests_backup, 0x033FF83C

Can someone help :frowning: Is there a list of these sounds somewhere and their ā€œcode namesā€?

1 Like

You can find a list of FrontEndSoundlist here

in terms of the sound you wanna play this is not the native. I’m not sure with other natives that would work.

If you search audio on the native reference below. It will come up with heaps.

https://runtime.fivem.net/doc/natives/#n_AUDIO

3 Likes

https://runtime.fivem.net/doc/natives/#_0xE9B09589827545E7

Report Crime?

2 Likes

yes…

That has nothing to do what he asked…

Actually it does, i have been testing this a long time ago together with @pongo1231. you just need to pick the right ID for the crime. However sometimes it works, sometimes it doesn’t (this is a issue related to FiveM since it always works in single player GTAV).

Interesting, wouldn’t of thought that native played audio

Does ReportCrime actually play audio :thinking:

Can’t you read?

This isn’t the best way to do it but it should work for you.

Backup.zip (27.8 KB)

1 Like

Ohh. So it plays radio scanner sounds. I’ve never played with it before so no clue, thats cool tho :stuck_out_tongue:

@FAXES Yeah, that doesn’t have what I need, thanks though :frowning:

@ghosty how would you do this in lua? or is it C# only?

What about if I export the sound from OpenIV and play an external sound, is that possible?

It’s works so it will do! Thanks :slight_smile:

1 Like

For those who fall on this post (didn’t try for the specific question of the author) but i have the same problem : I can play some specif sound but some other’s no i’ve solved my problem on using RequestAmbientAudioBank with the good audiobank in parameter.
For example :

PlaySoundFrontend( -1, "TUMBLER_PIN_FALL", "SAFE_CRACK_SOUNDSET", 1) -- not working

dont work but :

RequestAmbientAudioBank("SAFE_CRACK", 0, 0) --This is the good audio bank
RequestAmbientAudioBank("DLC_Biker_Cracked_Sounds", 0, 0) -- or maybe her didn't remember
PlaySoundFrontend( -1, "TUMBLER_PIN_FALL", "SAFE_CRACK_SOUNDSET", 1)

work

6 Likes

How do you find the audioname of a sound? I’ve looked at GTA files with OpenIV but only found the sound set name.

I am in the same boat as this