Need voice radius script

Been searching Google , cant search these forums cause im not allowed, checked Garrys mod downloads for voice radius script.

The ones that I have found don’t work or are terribly outdated.

Is there anyone that could make a quick voice radius script for about 500 range? or allow it to be controlled via convar

Check how DarkRP does it then implement it how you want.

The one I am trying to use in the newest version of DARK RP is broke players can still be heard when max distances… Tested it many times.

Infuriating.

[lua]
function GM:PlayerCanHearPlayersVoice( listener, talker )
if not talker:Alive() then return false end
if listener:GetPos():Distance(talker:GetPos()) >= 500 then return false end
return true
end
[/lua]

?

Also, check if sv_alltalk is set to 1. If it is, set it to 0.

rp_voiceradius 1
rp_3dvoice 1
That will make it fade once you go away further.
Then sv_alltalk 0.

The combination of both of you have solved my issue. THANKS!