Skip to content

OnPhoneNameUpdate

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

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

Location

  • PhoneController::UpdatePhoneName(string newName)
csharp
//---
{
	if (newName.Length > 30)
	{
		newName = newName.Substring(0, 30);
	}
	if (Interface.CallHook("OnPhoneNameUpdate", this, newName, currentPlayer) == null)
	{
		PhoneName = newName;
		base.baseEntity.SendNetworkUpdate();
		Interface.CallHook("OnPhoneNameUpdated", this, PhoneName, currentPlayer);
	}
//---

Released under the MIT License.