First, try to get your pet used to peeing outside. Trust me it will help you a lot. And secondly, you can use waterproof rug pads, this will help you a lot because pets tend to pee a lot on carpets, and using waterproof rug pads will ensure your floor is protected. Apart from these tips, there is nothing you can do.