Нашел скрипт спецсигналов в интернете, но он что-то не работает...
client.lua
local url = "sound.mp3"
function playTheSound(x, y, z, vehicle)
sound = playSound3D(url, x, y, z)
if (isElement(vehicle)) then attachElements(sound, vehicle) end
end
addEvent("playTheSound", true)
addEventHandler("playTheSound", root, playTheSound)
local url2 = "sound2.mp3"
function playTheSound2(x, y, z, vehicle)
sound = playSound3D(url2, x, y, z)
if (isElement(vehicle)) then attachElements(sound, vehicle) end
end
addEvent("playTheSound2", true)
addEventHandler("playTheSound2", root, playTheSound2)
local url3 = "sound3.mp3"
function playTheSound3(x, y, z, vehicle)
sound = playSound3D(url3, x, y, z)
if (isElement(vehicle)) then attachElements(sound, vehicle) end
end
addEvent("playTheSound3", true)
addEventHandler("playTheSound3", root, playTheSound3)
local url4 = "sound4.mp3"
function playTheSound4(x, y, z, vehicle)
sound = playSound3D(url4, x, y, z)
if (isElement(vehicle)) then attachElements(sound, vehicle) end
end
addEvent("playTheSound4", true)
addEventHandler("playTheSound4", root, playTheSound4)
function stopTheSound(x, y, z)
stopSound(sound)
end
addEvent("stopTheSound", true)
addEventHandler("stopTheSound", root, stopTheSound)
function stopTheSound2(x, y, z)
stopSound(sound)
end
addEvent("stopTheSound2", true)
addEventHandler("stopTheSound2", root, stopTheSound2)
function stopTheSound3(x, y, z)
stopSound(sound)
end
addEvent("stopTheSound3", true)
addEventHandler("stopTheSound3", root, stopTheSound3)
function stopTheSound4(x, y, z)
stopSound(sound)
end
addEvent("stopTheSound4", true)
addEventHandler("stopTheSound4", root, stopTheSound4)
meta.xml
<meta>
<script src="client.lua" type="client"/>
<file src="sound.mp3" type="client"/>
<file src="sound2.mp3" type="client"/>
<file src="sound3.mp3" type="client"/>
<file src="sound4.mp3" type="client"/>
</meta>