Film director Lee Tamahori has pleaded no contest to criminal trespass in exchange for two prostitution charges being dropped, US authorities said.
Lee Tamahori directed Die Another Day and Mulholland Falls
The New Zealander was arrested for allegedly soliciting a police officer in Los Angeles while dressed in drag.
Tamahori, 55, was given three years probation, 15 days community service and must take an Aids awareness course.
"He's pleased with the outcome, and he's back at work," Tamahori's lawyer Mark Geragos said.
The Die Another Day director was arrested on 8 January after allegedly offering to perform a sex act on an undercover officer taking part in a prostitution sting in Hollywood.
Police confirmed at the time that he was wearing a black off-the-shoulder dress and a wig.
Los Angeles' City Attorney's office spokesman Frank Matelijan said the plea deal meant two charges of solicitation and loitering with intent to commit prostitution were dismissed.
As part of his community service Tamahori will be working on projects to help clean up Hollywood.
"It is a project where convicts clean the streets in Hollywood and paint out graffiti," said Mr Matelijan.
Tamahori also directed action sequel XXX: State of the Union, Once Were Warriors and Mulholland Falls.