Generally, a uncoerced admission to officers isn't inherently unlawful, but its use in the legal system is a complex matter. The vital factor is whether it was obtained fairly. Officers must adhere to specific rules, https://panchanandshaw.com/blog/contempt-of-court-explained/