As long as he keeps smeling amonia on the
carpet, his own, he will think that it is OK
to use that as the toilet.
Get some Bitter Apple as I've heard it is good cat repellent, and spread some vinegar on the carpet, too. If it doesn't work and it gets worse, you're going to have to start thinking on getting another carpet.