Melo may not have to take a pay cut, dude. That's why Houston is moving Asik and Lin. So they can offer a max talent max dollars. Assuming Houston picks up Beverley's option and cuts Lin, they're sitting at $41.8 million. If they opt to pick up Parsons' option, they'll be at $42.7 million. The salary cap is expected to increase to $63.2 million this offseason and a max contract for Melo would start at around $22 million, I believe. So to make it work, they would just have to flip Motiejunas' contract and/or Jones. It gets a little more complicated if they opt not to pick up Parsons option and make him a RFA, but that remains to be seen.
But even if Melo had to take maybe $1-2 million less to play for Houston, he would still make about as much money as Howard and he'd be taking the slightest of pay cuts to play for the best team (by far) he's ever played for.