Skip to content

OnPhoneNameUpdate

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

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

Location

  • PhoneController::UpdatePhoneName(BaseEntity.RPCMessage msg)
csharp
//---
		string text = msg.read.String();
		if (text.Length > 30)
		{
			text = text.Substring(0, 30);
		}
		if (Interface.CallHook("OnPhoneNameUpdate", this, text, msg.player) == null)
		{
			PhoneName = text;
			base.baseEntity.SendNetworkUpdate();
			Interface.CallHook("OnPhoneNameUpdated", this, PhoneName, msg.player);
		}
//---

Released under the MIT License.