Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Manason/mana_audio
Browse files Browse the repository at this point in the history
  • Loading branch information
Manason committed Sep 9, 2024
2 parents 37eb6a2 + b7dc4ba commit c469b09
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ RegisterNetEvent('mana_audio:client:playSound', playSound)

---@param data PlaySoundFromEntityParams
local function playSoundFromEntity(data)
if not DoesEntityExist(data.entity) then return end
if type(data.audioName) == 'string' then
data.audioName = {data.audioName}
end
Expand All @@ -61,6 +62,7 @@ end
exports('PlaySoundFromEntity', playSoundFromEntity)

RegisterNetEvent('mana_audio:client:playSoundFromEntity', function(data)
if not NetworkDoesEntityExistWithNetworkId(data.netId) then return end
playSoundFromEntity({
audioBank = data.audioBank,
audioName = data.audioName,
Expand Down

0 comments on commit c469b09

Please sign in to comment.