Clone voice with packet injection
Howdy!
I'm new in c# development and try now to clone the voice from a client and send it to a defined place. (If that works, I will add later some more features). I got this script running (After joining this area the client crashes with the error "Unknown Wire Type: 6" I also don't understand where the "this.net.id" come from. If you find an easier way to broadcast voice/ music to another player I will use that instead.
        object OnPlayerVoice(BasePlayer player, Byte[] data)
        {

            if (player.userID == (ulong)removed for forum)
            {
                Network.Net.sv.write.PacketID(Message.Type.VoiceData);
                Network.Net.sv.write.UInt32(this.net.ID);
                Network.Net.sv.write.BytesWithSize(data);
                Write write = Network.Net.sv.write;
                SendInfo sendInfo = new SendInfo(BaseNetworkable.GetConnectionsWithin(new Vector3(8.419424f, 4.099996f, -80.9396f), 100f))
                {
                    priority = Priority.Immediate
                };
                write.Send(sendInfo);
            }
            return null;
        }​

My Code so far...
Thanks for the help and sorry for my bad English.
Thats if you want to play music to client? If you make something good and working i would lile to see it on Umod :)
The FX thing is a good idea, but you can only play rust assets and my goal is to Stream a radio to players. I think the best way is to cut the packets that come in from the sending client and send them to permitted clients. But for me, the Network class looks way too hard to use.

Merged post

No one any idea to get this working? :c