Multiple local sounds around the map

Hey guys I’m trying to figure this out and have had no luck. I’m attempting to make radios around the map all play a locally heard sound around that map and can be heard from every radio regardless of which one you were closest to when it first played. Currently both codes make a sound that can be heard from the radio but only the one that you were closest to when the function was used. I’m hoping someone knows how to help me.

Basically, make it so the player can run to any radio and hear the sound being emitted.

This one emits a sound from the radio.




for k, v in pairs( ents.FindByClass( "en_radio" ) ) do
	v:EmitSound( "radio/radio4.wav", 75, 100, 1, CHAN_AUTO ) )
end



This one plays a sound at the exact location of each radio.



sound.Play( "radio/radio4.wav", Vector( -1852.502319, -744.413269, 107.285957 ), 70, 100 ) --Spawn
sound.Play( "radio/radio4.wav", Vector( 205.704163, -1407.802368, 160.667465 ), 70, 100 ) --Ghetto
sound.Play( "radio/radio4.wav", Vector( -395.355255, 915.336365, 173.545135 ), 80, 100 ) --Warehouses


Either use

CreateSound combined with a

RecipientFilter, or execute your code on the client instead of from the server.

Using the first method described would require you to do:

[lua]
local filter = RecipientFilter()
filter:AddAllPlayers()

for k, v in pairs(ents.FindByClass(“en_radio”)) do
v.soundEmitter = CreateSound(v, “radio/radio4.wav”, filter)
v.soundEmitter:Play()
end
[/lua]