Skip to content

OnPhoneNameUpdate

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnPhoneNameUpdate( PhoneController instance, string text, BasePlayer player )
{
    Puts( "OnPhoneNameUpdate works!" );
}

Location

  • PhoneController::UpdatePhoneName(BaseEntity/RPCMessage msg)
csharp
//---
	string text = msg.read.String(256, false);
	if (text.Length > 20)
	{
		text = text.Substring(0, 20);
	}
	if (Interface.CallHook("OnPhoneNameUpdate", this, text, msg.player) != null)
	{
		return;
	}
	this.PhoneName = text;
	base.baseEntity.SendNetworkUpdate(BasePlayer.NetworkQueue.Update);
//---

Released under the MIT License.