Cunningham, a forward for the NBA's Charlotte Bobcats, left the court minutes after pleading guilty and paying a $225 fine for equipment violations - overly wide wheels and a too-high bumper.
The fine covered the fact that his silver car was making "unreasonable noise," said Cunningham's attorney, Theodore Simon.
"The car's a diesel; it makes a lot of noise," Simon said later in a phone interview from his Philadelphia office.
Cunningham, of West Linn, Ore., was pulled over by officers in the 100 block of Lancaster Avenue. After his arrest, he was released on $10,000 unsecured bail.
Cunningham allegedly admitted to officers that he "smoked weed" a few days before the stop and allowed police to search the vehicle.
Besides marijuana and the loaded pellet gun, police found a ceramic smoking pipe and a partially smoked blunt, court documents said.
Contact staff writer Bonnie L. Cook at 610-313-8232 or bcook@phillynews.com. Read her blog, "MontCo Memo," at www.philly.com/montcomemo Follow the Inquirer at www.Twitter.com/PhillyInquirer and www.Facebook.com/PhillyInquirer