San Francisco 49ers linebacker Aldon Smith has avoided jail time for drunken driving and gun charges after pleading no contest.

The linebacker was sentenced to complete 235 hours of community service and he will also be on probation for three years and must pay a fine of $2,000. He has been credited for 35 hours of community service he has already completed, according to USA Today.

Smith will complete his time by serving 11 days on a sheriff’s work crew.

As part of his probation, Smith must abstain from using alcohol and also may not own any guns or ammunition for the duration of his probation, according to the San Jose Mercury News.

Smith could have been sentenced to four years in jail if he was convicted on the three weapons charges and two DUI misdemeanors from his past arrests.

This is just the latest incident the Smith has gotten into during his short career. Earlier this year Smith was charged with making a false bomb threat, but didn’t face any charges, as we previously reported.

Smith may still face punishment from the NFL for these charges.