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);
		Facepunch.Rust.Analytics.Azure.OnUGCCreated(player, photoEntity, "photo", array.Length);
//---

Released under the MIT License.