Skip to content

OnMetalDetectorFlagRequest

Usage

  • No return behavior

Example Autogenerated

csharp
private void OnMetalDetectorFlagRequest( BaseMetalDetector instance, Vector3 vector, BasePlayer player )
{
    Puts( "OnMetalDetectorFlagRequest works!" );
}

Location

  • BaseMetalDetector::RPC_RequestFlag(BaseEntity/RPCMessage rpc)
csharp
//---
	if (this.nearestSource == null)
	{
		return;
	}
	Vector3 vector = rpc.read.Vector3();
	Interface.CallHook("OnMetalDetectorFlagRequest", this, vector, player);
	Vector3 pos;
	if (this.nearestSource.VerifyScanPosition(player.transform.position, vector, out pos))
	{
		this.nearestSource.Detected(pos);
	}
//---

Released under the MIT License.