public static void LeaveRadioChannel(IPlayer player) { if (!VoiceManager.TryGetVoiceClient(player, out VoiceClient voiceClient)) { return; } foreach (RadioChannel radioChannel in VoiceManager.RadioChannels.Where(r => r.IsMember(voiceClient))) { VoiceManager.LeaveRadioChannel(player, radioChannel.Name); } }
public void OnLeaveRadioChannel(IPlayer player, string channelName) { VoiceManager.LeaveRadioChannel(player, channelName); //player.SendChatMessage("Radio", $"You left channel \"{channelName}\"."); }