[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)