# Server Methods

This is a list of server methods that can be used.

ToVoiceClient
// Converts a Player to a VoiceClient
VoiceClient? client = player.ToVoiceClient();
MoveToVoiceChannel
// Moves a player into the configured ingame voice channel
player.MoveToVoiceChannel();
GetCurrentCall
// Gets the current phone call of a player
PhoneCall? call = player.GetCurrentCall();
GetCurrentCallId
// Gets the current call ID of a player
string? callId = player.GetCurrentCallId();
IsInCall
// Checks if a player is currently in a call
if (player.IsInCall()) { ... }
GetRadioFrequency
// Gets the radio frequency of a player
string frequency = player.GetRadioFrequency();
HasRadioFrequency
// Checks if a player has a radio frequency set
if (player.HasRadioFrequency()) { ... }
GetRadioChannel
// Gets the radio channel object of a player
RadioChannel? channel = player.GetRadioChannel();
SetForceMuted
// Forces a player to be muted or unmuted
player.SetForceMuted(true);
StartCall
// Starts a phone call between two players (call when target accepts)
Main.PhoneService.StartCall(caller, target);
EndCall
// Ends the current phone call for a player
Main.PhoneService.EndCall(player);
AddToCallGroup
// Adds a player to an existing call group (returns false if failed)
bool success = Main.PhoneService.AddToCallGroup(caller, target);
EnterRadioChannel
// Makes a player enter a radio channel with the specified frequency
Main.RadioService.EnterRadioChannel(player, "123.45");
LeaveRadioChannel
// Makes a player leave their current radio channel
Main.RadioService.LeaveRadioChannel(player);
GetRadioChannel
// Gets a radio channel by frequency
RadioChannel? channel = Main.RadioService.GetRadioChannel("123.45");