Plugin Voice Range for Rust

Hi,
I am the owner of a roleplay server. I’m currently trying to write a plugin to change the voice range. I’ve seen this on other Rust RP servers. They wrote the plugin themselves and don’t want to give it away.

My approach was determine the distance to the other players and somehow try to block the P2P packets at a distance of 10 meters.

Does anyone have an idea?

I would be happy if someone could give me a tip.

Thanks very much and sorry for my bad english.