public void JoinRadioChannel(VoiceClient voiceClient, string radioChannelName, bool isPrimary) { foreach (RadioChannel channel in this.RadioChannels) { if (channel.Members.Any(v => v.VoiceClient == voiceClient && v.IsPrimary == isPrimary)) { return; } } RadioChannel radioChannel = this.GetRadioChannel(radioChannelName, true); radioChannel.AddMember(voiceClient, isPrimary); }
public static void JoinRadioChannel(Player player, string radioChannelName, bool isPrimary) { if (!VoiceManager._voiceClients.TryGetValue(player, out VoiceClient voiceClient)) { return; } foreach (RadioChannel channel in VoiceManager.RadioChannels) { if (channel.Members.Any(v => v.VoiceClient == voiceClient && v.IsPrimary == isPrimary)) { return; } } RadioChannel radioChannel = VoiceManager.GetRadioChannel(radioChannelName, true); radioChannel.AddMember(voiceClient, isPrimary); }
public void JoinRadioChannel(IPlayer player, string radioChannelName) { if (!this.TryGetVoiceClient(player, out VoiceClient voiceClient)) { return; } foreach (RadioChannel channel in this.RadioChannels) { if (channel.IsMember(voiceClient)) { return; } } RadioChannel radioChannel = this.GetRadioChannel(radioChannelName, true); radioChannel.AddMember(voiceClient); }
public static void JoinRadioChannel(GTANetworkAPI.Client player, string radioChannelName) { if (!VoiceManager.TryGetVoiceClient(player, out VoiceClient voiceClient)) { return; } foreach (RadioChannel channel in VoiceManager.RadioChannels) { if (channel.IsMember(voiceClient)) { return; } } RadioChannel radioChannel = VoiceManager.GetRadioChannel(radioChannelName, true); radioChannel.AddMember(voiceClient); }