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.
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.
Thanks for the help and sorry for my bad English.