Skip to content

OnWireConnect

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnWireConnect( BasePlayer player, IOEntity iOEntity, int inputIndex, IOEntity iOEntity2, int outputIndex, List`1 linePoints, List`1 slackLevels )
{
    Puts( "OnWireConnect works!" );
}

Location

  • WireTool::RPC_MakeConnection(BaseEntity/RPCMessage rpc)
csharp
//---
		array[i].boneName = wireLineAnchorInfo.boneName;
		array[i].index = (int)wireLineAnchorInfo.index;
		array[i].position = wireLineAnchorInfo.position;
	}
	WireTool.WireColour wireColour = this.IntToColour(wireConnectionMessage.wireColor);
	if (Interface.CallHook("OnWireConnect", player, iOEntity, inputIndex, iOEntity2, outputIndex, wireConnectionMessage.linePoints, slackLevels) != null)
	{
		return;
	}
	if (wireColour == WireTool.WireColour.Invisible && !player.IsInCreativeMode)
	{
//---

Released under the MIT License.