diff --git a/audiodirectory/awc.nametable b/audiodirectory/awc.nametable new file mode 100644 index 0000000..28af293 Binary files /dev/null and b/audiodirectory/awc.nametable differ diff --git a/audiodirectory/jail_sounds.awc b/audiodirectory/jail_sounds.awc new file mode 100644 index 0000000..a31558f Binary files /dev/null and b/audiodirectory/jail_sounds.awc differ diff --git a/audiodirectory/output.awc.xml b/audiodirectory/output.awc.xml new file mode 100644 index 0000000..9f02b07 --- /dev/null +++ b/audiodirectory/output.awc.xml @@ -0,0 +1,32 @@ + + + + + + + jail + jail.wav + + + peak + + + data + + + format + ADPCM + + + + + + + + + + + + + + \ No newline at end of file diff --git a/configs/client.lua b/configs/client.lua index d53f128..c653626 100644 --- a/configs/client.lua +++ b/configs/client.lua @@ -120,6 +120,25 @@ return { } }, + playJailSound = function() + if GetResourceState('qbx_core') == 'started' then + lib.load('@qbx_core.modules.lib') + + qbx.loadAudioBank('audiodirectory/jail_sounds') + qbx.playAudio({ + audioName = 'jail', + audioRef = 'jail_soundset', + source = cache.ped + }) + ReleaseNamedScriptAudioBank('audiodirectory/jail_sounds') + else + RequestScriptAudioBank('audiodirectory/jail_sounds', false) + PlaySoundFromEntity(GetSoundId(), 'jail', cache.ped, 'jail_soundset', false, false) + ReleaseNamedScriptAudioBank('audiodirectory/jail_sounds') + end + end, + + -- Reloads Player's Last Skin When Freed -- ResetClothing = function() -- TriggerEvent('illenium-appearance:client:reloadSkin', true) @@ -141,7 +160,7 @@ return { Dispatch = function(coords) -- exports['ps-dispatch']:PrisonBreak() -- TriggerEvent('police:client:policeAlert', coords, 'Prison Break') - + -- ND Core -- exports["ND_MDT"]:createDispatch({ -- caller = "Boilingbroke Penitentiary", @@ -150,4 +169,4 @@ return { -- coords = vec3(1845.8302, 2585.9011, 45.6726) -- }) end, -} \ No newline at end of file +} diff --git a/data/audioexample_sounds.dat54.rel b/data/audioexample_sounds.dat54.rel new file mode 100644 index 0000000..e01f01d Binary files /dev/null and b/data/audioexample_sounds.dat54.rel differ diff --git a/data/audioexample_sounds.dat54.rel.xml b/data/audioexample_sounds.dat54.rel.xml new file mode 100644 index 0000000..e7b6ba3 --- /dev/null +++ b/data/audioexample_sounds.dat54.rel.xml @@ -0,0 +1,31 @@ + + + + audiodirectory\jail_sounds + + + + jail_sp +
+ + + scripted +
+ audiodirectory/jail_sounds + jail + +
+ + jail_soundset +
+ +
+ + + jail + jail_sp + + +
+
+
\ No newline at end of file diff --git a/fxmanifest.lua b/fxmanifest.lua index 9a8dfc2..ac71724 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -23,12 +23,17 @@ server_scripts { } files { + 'data/audioexample_sounds.dat54.rel', + 'audiodirectory/jail_sounds.awc', 'locales/*.json', 'configs/client.lua', 'configs/prisonbreak.lua', 'modules/client/*.lua', 'bridge/compat/client.lua', - 'bridge/compat/resources.lua' + 'bridge/compat/resources.lua', } -ox_libs { 'locale' } \ No newline at end of file +data_file 'AUDIO_WAVEPACK' 'audiodirectory' +data_file 'AUDIO_SOUNDDATA' 'data/audioexample_sounds.dat' + +ox_libs { 'locale' } diff --git a/modules/client/prison.lua b/modules/client/prison.lua index f15123c..abd911a 100644 --- a/modules/client/prison.lua +++ b/modules/client/prison.lua @@ -178,7 +178,7 @@ function prisonModules.enterPrison(setTime) FreezeEntityPosition(cache.ped, false) - TriggerServerEvent("InteractSound_SV:PlayOnSource", "jail", 0.5) + config.playJailSound() config.Emote(RandomSpawn.emote) prisonModules.createCheckoutLocation() @@ -281,4 +281,4 @@ function prisonModules.applyPrisonUniform() SetPedComponentVariation(cache.ped, 11, outifitInfo.jacket.item, outifitInfo.jacket.texture) -- Jacket end -return prisonModules \ No newline at end of file +return prisonModules diff --git a/wav/jail.wav b/wav/jail.wav new file mode 100644 index 0000000..9c3fd9e Binary files /dev/null and b/wav/jail.wav differ