OnCCTVDirectionChange
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private void OnCCTVDirectionChange( CCTV_RC instance, BasePlayer player )
{
Puts( "OnCCTVDirectionChange works!" );
}
Location
- CCTV_RC::Server_SetDir(BaseEntity/RPCMessage msg)
csharp
//---
BasePlayer player = msg.player;
if (!player.CanBuild() || !player.IsBuildingAuthed())
{
return;
}
if (Interface.CallHook("OnCCTVDirectionChange", this, player) != null)
{
return;
}
Vector3 vector = Vector3Ex.Direction(player.eyes.position, this.yaw.transform.position);
vector = base.transform.InverseTransformDirection(vector);
//---