State Police say they found two men with cocaine after police pulled the driver over for tinted windows and not signaling a lane change.
Troopers pulled Regis Cox, 23, over Saturday afternoon and searched the car after smelling marijuana coming from inside while interviewing Cox.
During the search, officials say they found cocaine, and Cox and the passenger, Diamond Ubiles, 21, both denied it was theirs.
Troopers say Ubiles originally gave them a fake name.
Both men were transported to State Police Niagara processing where troopers say Cox started vomiting.
According to officials, Cox vomited into a garbage can and then tried to retrieve something from inside the garbage can.
Troopers say they stopped Cox from getting whatever he was reaching for inside the trash. Upon inspection, police say they found remnants of a plastic bag possibly containing the residue of a controlled substance.
Officials say Cox started having a medical emergency and then became unresponsive. Troopers immediately began life saving measures while contacting Emergency Medical Services.
Cox was transported to Mount Saint Mary's Hospital in Lewiston, according to troopers.
State Police say a preliminary toxicology screen conducted at the hospital showed cocaine.
Cox is being charged with criminal possession of a controlled substance and traffic violations, according to officials. Officials also say Ubiles was charged with criminal impersonation and given an appearance ticket.