Phone (10)

All currently available hooks that are found in Carbon. Most hooks would be ones compatible with Oxide, although there are Carbon-only ones as well.

CanReceiveCall

  • Called when a player tries to place a phone call.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PhoneController.CanReceiveCall of Assembly-CSharp.dll.

Example
object CanReceiveCall(PhoneController self)
{
    Puts("CanReceiveCall was called!");
    return (bool) null;
}

OnPhoneAnswer

  • Called when a player tries to answer a phone call.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PhoneController.AnswerPhone of Assembly-CSharp.dll.

Example
object OnPhoneAnswer(PhoneController self, PhoneController self1)
{
    Puts("OnPhoneAnswer was called!");
    return (object) null;
}

OnPhoneAnswered

  • Called right after a player has answered a phone call.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PhoneController.AnswerPhone of Assembly-CSharp.dll.

Example
void OnPhoneAnswered(PhoneController self, PhoneController self1)
{
    Puts("OnPhoneAnswered was called!");
}

This hook requires OnPhoneAnswer, which loads alongside OnPhoneAnswered.

OnPhoneCallStart

  • Called after a phone has been answered, right before voice communication is established.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PhoneController.BeginCall of Assembly-CSharp.dll.

Example
object OnPhoneCallStart(PhoneController self, PhoneController self1, PhoneController self2)
{
    Puts("OnPhoneCallStart was called!");
    return (object) null;
}

OnPhoneCallStarted

  • Called right after a phone call has been answered and voice communication has been established.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PhoneController.BeginCall of Assembly-CSharp.dll.

Example
void OnPhoneCallStarted(PhoneController self, PhoneController self1, PhoneController self2)
{
    Puts("OnPhoneCallStarted was called!");
}

This hook requires OnPhoneCallStart, which loads alongside OnPhoneCallStarted.

OnPhoneDial

  • Called when a player places a phone call.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PhoneController.CallPhone of Assembly-CSharp.dll.

Example
object OnPhoneDial(PhoneController self, PhoneController local0, PhoneController self1)
{
    Puts("OnPhoneDial was called!");
    return (object) null;
}

OnPhoneDialFail

  • Called when a phone call is about to end or fail to start.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PhoneController.OnDialFailed of Assembly-CSharp.dll.

Example
object OnPhoneDialFail(PhoneController self, Telephone.DialFailReason reason, PhoneController self1)
{
    Puts("OnPhoneDialFail was called!");
    return (object) null;
}

OnPhoneDialFailed

  • Called after a phone call has ended or failed to start.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PhoneController.OnDialFailed of Assembly-CSharp.dll.

Example
void OnPhoneDialFailed(PhoneController self, Telephone.DialFailReason reason, PhoneController self1)
{
    Puts("OnPhoneDialFailed was called!");
}

This hook requires OnPhoneDialFail, which loads alongside OnPhoneDialFailed.

OnPhoneDialTimedOut

  • Called right after a phone was automatically hung up because the receiver phone wasn't answered in time.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PhoneController.TimeOutDialing of Assembly-CSharp.dll.

Example
void OnPhoneDialTimedOut(PhoneController self, PhoneController self1, PhoneController self2)
{
    Puts("OnPhoneDialTimedOut was called!");
}

This hook requires OnPhoneDialTimeout, which loads alongside OnPhoneDialTimedOut.

  • Called when a phone is about to automatically hang up because the receiver phone wasn't answered in time.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches PhoneController.TimeOutDialing of Assembly-CSharp.dll.

Example
object OnPhoneDialTimeout(PhoneController self, PhoneController self1, PhoneController self2)
{
    Puts("OnPhoneDialTimeout was called!");
    return (object) null;
}

Last updated