We thought our cat ruined our basement - she sprayed all over (yep, she - didn't know females did it too) since got her fixed, and problem solved. We did get the smell out. We completely soaked the carpet down probably through the padding with Natures Miracle, let it sit overnight. Then we added another light coating again, and used a steam-cleaner with resolve cleaning agent.
The clothes - that was worse. We used to sort the piles on the floor in the family room, and one week she sprayed about 6-7 loads. I'd say, I got the smell out in the 1st wash for 90% of the time but some fabrics I had to wash a 2nd time.
My recipe - add clothes to hot wash, but I had a lot of gentles that needed cold, and it worked for them. 1 1/2 cup or so of vinegar, a scoop of oxyclean, and a cup of baking soda. Ran the wash for a few mins to get everything all stirred up, and then soaked overnight. The next morning, add detergent. I used to use Dreft, but found Arm/Hammer and Tide work fine too. It has to be enzymatic - I think most brand names are. Add another cup of vinegar during rinse cycle to soften fabric, and absorb more smell. I also added fabric softener. Line dry. If they still smell, repeat. I've been lucky - and haven't had any colors change/fade or anything stretch/shrink - even the dedicates - which I washed on heavy duty - figured with cat pee on them already I had nothing to loose.
The vinegar - neutralizes the pee - so the cat doesn't smell it again.
Oxyclean - breaks up stains (and I presume smells too)
Baking Soda - absorbs the odor - and makes bubbly action w/ vinegar.
Only have one item of clothing it didn't work on, something with some kind of elastic or something in the neckline.