Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added audiodirectory/awc.nametable
Binary file not shown.
Binary file added audiodirectory/jail_sounds.awc
Binary file not shown.
32 changes: 32 additions & 0 deletions audiodirectory/output.awc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<AudioWaveContainer>
<Version value="1" />
<ChunkIndices value="True" />
<Streams>
<Item>
<Name>jail</Name>
<FileName>jail.wav</FileName>
<Chunks>
<Item>
<Type>peak</Type>
</Item>
<Item>
<Type>data</Type>
</Item>
<Item>
<Type>format</Type>
<Codec>ADPCM</Codec>
<Samples value="80571" />
<SampleRate value="44100" />
<Headroom value="-200" />
<PlayBegin value="0" />
<PlayEnd value="0" />
<LoopBegin value="0" />
<LoopEnd value="0" />
<LoopPoint value="-1" />
<Peak unk="0" />
</Item>
</Chunks>
</Item>
</Streams>
</AudioWaveContainer>
23 changes: 21 additions & 2 deletions configs/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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",
Expand All @@ -150,4 +169,4 @@ return {
-- coords = vec3(1845.8302, 2585.9011, 45.6726)
-- })
end,
}
}
Binary file added data/audioexample_sounds.dat54.rel
Binary file not shown.
31 changes: 31 additions & 0 deletions data/audioexample_sounds.dat54.rel.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<Dat54>
<Version value="7314721" />
<ContainerPaths>
<Item>audiodirectory\jail_sounds</Item>
</ContainerPaths>
<Items>
<Item type="SimpleSound">
<Name>jail_sp</Name>
<Header>
<Flags value="0x00008004" />
<Volume value="200" />
<Category>scripted</Category>
</Header>
<ContainerName>audiodirectory/jail_sounds</ContainerName>
<FileName>jail</FileName>
<WaveSlotNum value="0" />
</Item>
<Item type="SoundSet">
<Name>jail_soundset</Name>
<Header>
<Flags value="0xAAAAAAAA" />
</Header>
<SoundSets>
<Item>
<ScriptName>jail</ScriptName>
<ChildSound>jail_sp</ChildSound>
</Item>
</SoundSets>
</Item>
</Items>
</Dat54>
9 changes: 7 additions & 2 deletions fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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' }
data_file 'AUDIO_WAVEPACK' 'audiodirectory'
data_file 'AUDIO_SOUNDDATA' 'data/audioexample_sounds.dat'

ox_libs { 'locale' }
4 changes: 2 additions & 2 deletions modules/client/prison.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -281,4 +281,4 @@ function prisonModules.applyPrisonUniform()
SetPedComponentVariation(cache.ped, 11, outifitInfo.jacket.item, outifitInfo.jacket.texture) -- Jacket
end

return prisonModules
return prisonModules
Binary file added wav/jail.wav
Binary file not shown.
Loading