some medications can... but the most common cause of foul smelling urine is an infection in your urinary tract. See a doctor and get your urine tested.
I copied and pasted this info from WebMD. IUn used "urine and ammonia" in the search field. Within the article was a subsection dealing with smell. Here it is. I hope it helps:
Urine normally doesn't have a very strong smell. If you get a whiff of something particularly pungent, you could have an infection or urinary stones, which can create an ammonia-like odor. Diabetics might notice that their urine smells sweet, because of excess sugar. In the past, doctors would actually taste urine for this sweetness to diagnose diabetes.
Some foods can also change urine odor. Asparagus is among the most notorious. What people are smelling when they eat asparagus is the breakdown of a sulfur compound called methyl mercaptan (the same compound found in garlic and skunk secretions). If you catch a whiff of something after eating a plate of asparagus, it means that you've inherited the gene for the enzyme that breaks down mercaptan. Not everyone has this enzyme and, therefore, not everyone can smell it.