he womt stop peeing!

br

ladies please help me! I have a cat Charles. he is my lil boy I treat him like hes my human son. hes almost 4 years old and hes was fixed when he was a baby. and he will not stop peeing everywhere. when he was a baby we lived with my mom and she had another dog and as he got older he started peeing everywhere he would even pee on my mother's bed while she was standing right there. a year or so later we moved in with my grandmother and he was so good he didnt pee until a months in then he started peeing again. but he was only peeing in the bathroom. if there was a bath mat down or a towel or clothes on the bathroom floor he would pee on them but he wouldent pee anywhere else. my grandma also had a dog. now we have just moved in with my boyfriend and he peed the first night on a blanket on the couch. weve been good about keeping the place clean and clutter free and the bathroom door closed to make sure he wont pee and he has a giant litter box! since that first night he hasn't peed and today my boyfriend left his pants outside the bathroom door while he was showering and he got out and my cat had peed on them! i thought he was peeing because of the dogs but we dont have any other animals just him now. please help. can I stop this? I have tried eveything and he wont stop hes my baby I dont want to get rid of him but if I cant get him to act right I have no other choice he is destroying eveything with his pee. so please any information would help.