Skip to content

OnPhotoCapture

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private object OnPhotoCapture( PhotoEntity photoEntity, Item item, BasePlayer player, byte[] array )
{
    Puts( "OnPhotoCapture works!" );
    return null;
}

Location

  • InstantCameraTool::TakePhoto(BaseEntity.RPCMessage msg)
csharp
//---
		item2.Remove();
		Debug.LogError("Sub-entity is not a photo");
	}
	else
	{
		if (Interface.CallHook("OnPhotoCapture", photoEntity, item, player, array) != null)
		{
			return;
		}
		photoEntity.SetImageData(player.userID, array);
		if (!player.inventory.GiveItem(item2))
//---

Released under the MIT License.