Did it follow inserted
meta.xml
<meta>
<script src="client.lua" type="client"/>
<script src="server.lua" type="server"/>
<file src="song.mp3"></file>
<file src="landing.mp3"></file>
</meta>
Client - Side
function speak (songName)
if not songName then return end
if (not isPedInVehicle(localPlayer)) then return end
if sound and isElement(sound) then
destroyElement(sound)
sound = nil
-- or stopSound(sound)
end
local theVehicle = getPedOccupiedVehicle (localPlayer)
local x,y,z = getElementPosition(theVehicle)
sound = playSound3D (songName, x, y, z)
attachElements(sound,theVehicle)
setSoundMaxDistance(sound, 100)
end
addEvent ("Ansage", true)
addEventHandler ("Ansage", getRootElement(), speak )
Server - Side
triggerClientEvent(client,"Ansage",client ,"song.mp3")
-- or
triggerClientEvent(client,"Ansage",client ,"landing.mp3")
However, the desired success because unfortunately still do not. Also you hear the normal sound of the helicopter.
It is still the first landing.mp3 played instead the start.mp3