Skip to content

OnCodeChanged

Usage

  • No return behavior

Example Autogenerated

csharp
private void OnCodeChanged( BasePlayer player, CodeLock instance, string text, bool flag )
{
    Puts( "OnCodeChanged works!" );
}

Location

  • CodeLock::RPC_ChangeCode(BaseEntity.RPCMessage rpc)
csharp
//---
			guestCode = text;
			hasGuestCode = guestCode.Length > 0;
			guestPlayers.Clear();
			guestPlayers.Add(rpc.player.userID);
		}
		Interface.CallHook("OnCodeChanged", rpc.player, this, text, flag);
		DoEffect(effectCodeChanged.resourcePath);
		SendNetworkUpdate();
		UpdateParentBox();
	}
}

Released under the MIT License.