According to TMZ.com, rapper Gucci Mane is playing games with the courts by claiming he’s mentally incompetent to understand the charges against him.

This is the oldest trick in the book. One that is used by veteran yardbirds and repeat offenders who wish to avoid being sent to prison right away. Naturally, the judge fell for it.

The 30-year-old rapper — real name Radric Davis — appeared in a Georgia courtroom yesterday after filing a “Special Plea of Mental Incompetency” … in which he explained he was in no state to “intelligently participate in the probation revocation hearing.”

According to the document, the judge ordered Gucci into custody — and immediately committed the rapper into a mental health treatment facility pending an evaluation of his mental condition.

We’re told Gucci is currently at the treatment facility.