Try use attachElements
function startMySound(player)
if isPedInVehicle(player) then
local vehicle = getPedOccupiedVehicle(player)
local x,y,z = getElementPosition(player)
local sound = playSound3D("sound1.mp3",x,y,z,true)
attachElements(sound,vehicle) -- It attach the sound to the vehicle
end
end
addEventHandler("onClientVehicleEnter",getRootElement(),startMySound)