There were three other people inside the car at the time and all were detained by officers. The weapon and a bag of marijuana were found at the scene, police said.