Skip to content

OnPhoneDial

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private object OnPhoneDial( PhoneController instance, PhoneController telephone, BasePlayer currentPlayer )
{
    Puts( "OnPhoneDial works!" );
    return null;
}

Location

  • PhoneController::CallPhone(int number)
csharp
//---
		return;
	}
	PhoneController telephone = TelephoneManager.GetTelephone(number);
	if (telephone != null)
	{
		if (Interface.CallHook("OnPhoneDial", this, telephone, currentPlayer) == null)
		{
			if (telephone.serverState == Telephone.CallState.Idle && telephone.CanReceiveCall())
			{
				SetPhoneState(Telephone.CallState.Dialing);
				lastDialedNumber = number;
//---

Released under the MIT License.