thanks but it play my sound when i start the script not if the freight hit the marker it comes only my outputchatbox
-- Client Side !
local marker = createMarker ( -1873.587890625, -1262.5078125, 15.474542617798, "cylinder", 1.5, 255, 255, 0, 170 )
function MarkerHit( hitElement, matchingDimension )
if ( hitElement == getLocalPlayer() ) then
outputChatBox( "Zugstation wurde gewarnt!" )
end
end
addEventHandler( "onClientMarkerHit",marker,MarkerHit,false )
function playHBFMusic()
local uSound = playSound3D( 'ansage/ansage.mp3',-1937.876953125, 128.0166015625, 26.273441314697 )
setSoundMaxDistance( uSound, 10000 )
setSoundMinDistance( uSound, 5000 )
end
addEventHandler( "onClientResourceStart",resourceRoot, playHBFMusic )
how i can make to play the sound when the freight hit the marker? thanks for your code but not fix