(CNN) If you've had a few too many, don't even think about grabbing those car keys. And if you live in New Jersey, put down those drone controls, too.

A bill banning people from operating unmanned aircraft devices while under the influence of alcohol or drugs was signed by Gov. Chris Christie on Monday, his last day in office, the Star-Ledger reports.

The bill defines "under the influence" as a blood-alcohol concentration of 0.08% or more -- the same threshold set by many states' drunk-driving laws. It also bans flying drones while under the influence of "a narcotic, hallucinogenic, or habit-producing drug."

Penalties for violating the new law include up to six months in prison and a $1,000 fine. The law also bans operating drones in or near jails or prisons, using them in a way that interferes with first responders or using them for hunting wildlife.

Seventeen states passed drone-related legislation in 2017, according to the National Conference of State Legislatures.

Read More