[Release] Play Custom Sounds for Interactions

Is there a trigger to stop a sound? Like on key press stop sound?

is there any way to prevent 3years old cheater from playing BIP sound for whole players?

I’ve been using interact sound for a while, but since updating server artifacts and switching over to OneSync, sounds can be heard across the server. Is there any fix for this anywhere?

same problem

same problem

The way it was fixed was in my server.cfg it said “set onesync on” not “+set onesync on” the “+” literally fucked everything up.

So check your server.cfg and make sure the “+” is there. (+set onesync on)

I just Created this script,

local everyoneAllowed = true 

local allowed = 
{
	"steam:000000000000000",
}



AddEventHandler('chatMessage', function(source, n, msg)
	local msg = string.lower(msg)
	local identifier = GetPlayerIdentifiers(source)[1]
	if msg == "/gitaar" then
		CancelEvent()
		if everyoneAllowed == true then
			TriggerServerEvent('InteractSound_SV:PlayOnAll', 'demo', 1.0)
			Wait(16000) 
		end
	end
end)

But nothing is happening, what did i do wrong?

lulsd

Script not working anymore?

By chance is there another method of this fix ?

Still having this issue even though ive been properly setup with onesync etc running without and with the +. (in cases im having it does not get enabled via your method )

Switched to the latest artifact and vehicle doorlocks have beenable to be heard across the map switching back fixes, however as of lately CFX forces your build updates now so I can’t leave it ofc.

(UPDATE): after using the recently forked and updated version of the QB interaction sounds it is working with onesync it seems that it changed from ReigsterServerEvent to RegisterNetEvent to properly call and work within how WB is.

You can see more here - GitHub - qbcore-framework/interact-sound: A resource providing the ability to play sounds using the FiveM NUI environment.

you have to add the audio file on __resource.lua / fxmanifest.lua

TriggerServerEvent('InteractSound_SV:PlayWithinDistance', 5.0, 'audioname', 0.7)

Where do i have to put it in?!

is it made for ESX?
sorry to ask

–start alarm–

RegisterCommand(‘play’, function(source,args))

TriggerClientEvent('InteractSound_SV:PlayOnAll','demo', 1.0)

CancelEvent()

end)

why does it not work?

can you help me? can not make it work

YAYSE

Is it possible, to trigger a sound at specific coordinates? (maybe with stereo audio function)

1 Like

No matter what I’ve tried. I cannot get 0.5 version sounds to play.
Any idea what might be wrong with 0.5 sounds not playing?

The sound does play with 0.4.1 albeit across the entire server still with OneSync enabled.

TriggerServerEvent('InteractSound_SV:PlayWithinDistance', 1.0, 'demo', 1.0)
nor does TriggerEvent('InteractSound_SV:PlayWithinDistance', 1.0, 'demo', 1.0)

ALSO TRIED

TriggerServerEvent('InteractSound_SV:PlayWithinDistance', 100.0, 'demo', 1.0)
TriggerEvent('InteractSound_SV:PlayWithinDistance', 100.0, 'demo', 1.0)

these worked with 0.4.1 (except for the issue of playing across entire server)

I agree with what Volliem said. I’m using this for an alarm script. (With Badger Bank Robbery) if I could just make the sound play at the coordinates of the alarm, that would be so good. Like how they do it in vanilla GTA story mode I believe.

Any fix to the thing where everyone in the server can hear car locking sound, and in general a lot of sounds.

Hi! i have a problem because i’m trying to activate sounds and nothing happen… i have all of sounds in ogg format in client/htm/sounds.

I’m tying with coffindance script [StandAlone] Coffin Dance when you death

my __resource:

– InteractSound by Scott
– Verstion: v0.0.1

– Manifest Version
resource_manifest_version ‘77731fab-63ca-442c-a67b-abc70f28dfa5’

– Client Scripts
client_script ‘client/main.lua’

– Server Scripts
server_script ‘server/main.lua’

– NUI Default Page
ui_page(‘client/html/index.html’)

– Files needed for NUI
– DON’T FORGET TO ADD THE SOUND FILES TO THIS!
files({
‘client/html/index.html’,
– Begin Sound Files Here…
– client/html/sounds/ … .ogg
‘client/html/sounds/stupid.ogg’,
‘client/html/sounds/stupid2.ogg’,
‘client/html/sounds/stupid1.ogg’,
‘client/html/sounds/changeBet.ogg’,
‘client/html/sounds/roulette.ogg’,
‘client/html/sounds/CoffinDance.ogg’,

})

in the coffindance script i have:; Config.PlayMusic = true – need InteractSound script: GitHub - plunkettscott/interact-sound: A resource providing the ability to play sounds using the FiveM NUI environment.

and: RegisterCommand(“coffindance”, function(source, args, rawCommand)
if not commState then
commState = true
if Config.PlayMusic then
if Config.PlayMusicOnlyOnSelf then
TriggerServerEvent(‘InteractSound_SV:PlayOnSource’, ‘CoffinDance’, 0.2)
else
TriggerServerEvent(‘InteractSound_SV:PlayWithinDistance’, Config.PlayMusicDistance, ‘CoffinDance’, 0.2)
end
end
StartCoffinDance(“Command”)
else

why none of my sounds are working? :frowning: