-- Client Side !
local marker = createMarker ( 0, 0, 2, "cylinder", 1.5, 255, 255, 0, 170 )
function MarkerHit( hitElement, matchingDimension )
if ( hitElement == getLocalPlayer() ) then
outputChatBox( "warned train station" )
end
end
addEventHandler( "onClientMarkerHit",marker,MarkerHit,false )
function playHBFMusic()
local uSound = playSound3D( 'sound/sirene.mp3', -1901.9541015625, 341.8291015625, 43.750392913818 )
setSoundMaxDistance( uSound, 3000 )
setSoundMinDistance( uSound, 1000 )
end
addEventHandler( "onClientResourceStart",resourceRoot, playHBFMusic )
Use it client side make sure the sound is added to meta .