Note to Kings: This is how you get value on a talented player who has underachieved and is trying to prove himself. If McGee plays well this season, the Mavericks get him on a minimum contract for next season. If he doesn’t, they don’t have to pay him anything next season. And they’re not paying him $9.5 million this year to find out whether he still has it.

McGee’s guarantee is unclear, as is his place on the roster. Even if McGee’s salary is fully guaranteed, he’ll have to best at least one player in the same boat for a regular-season roster spot.

He’ll compete with Pachulia, Dalembert, Mejri and Famous to fill the center role vacated by DeAndre Jordan. If he’s healthy and focused – two longshots – McGee can help. He’s 7-foot and at least had excellent hops.

There’s nothing wrong with Dallas betting on these longshots. Jordan’s defection left the Mavericks desperate. They’re throwing a bunch of players against the wall and hoping one sticks. McGee makes sense with that strategy.

I’m a bit surprised McGee accepted this deal, though. The 76ers owed him $12 million this season. After Philadelphia’s set-off, McGee will make just an extra $1,043,723 from Dallas. Was that really worth locking himself into a minimum salary for next season – especially because even that isn’t guaranteed? At some point McGee needs to reestablish his viability as an NBA player, but I would have held out for a one-year contract. The fallback would have been sitting and getting paid by the 76ers, not a two-year minimum contract with a team option.

The Mavericks need McGee to make better decisions, but he probably made a poor one merely by signing with them.

Mejri’s guarantee would seem to give him a leg up, but Dallas hasn’t shied from eating guaranteed contracts in the past. He’ll have to earn his roster spot in training camp just like everyone else.

Mejri is a 29-year-old, 7-foot-2 center who played for Real Madrid last season and represented Tunisia in the 2012 London Olympics. He uses his size relatively well on both ends of the floor – finishing at the rim, defending the paint and crashing the glass – but facing NBA athleticism will be a major adjustment.

The Mavericks are desperate at center after DeAndre Jordan reneged and re-signed with the Clippers. Maybe Mejri will help. The best thing I can say about him: Dallas believed in him enough to fully guarantee his 2015-16 salary. That’s either a positive signal or sign of desperation – or maybe a bit of both.

Villanueva is a solid stretch four, shooting 37.6% on 3-pointers last season. He might not do much else, especially defend, but that skill is vital in Dallas.

The Mavericks scored a sterling 110.5 points per 100 possessions with Monta Ellis, Parsons, Nowitzki and Tyson Chandler on the floor. Swap Villanueva for Nowitzki and that barely drops to 110.4.

Whoever starts at point guard in Dallas, that outside shooting from the power forward spot is pivotal for floor spacing around the pick-and-roll. Nowitzki can’t play all the time, and his minutes should probably come down even further at age 37. Villanueva preserves the spacing.

Acquiring Lin or another point guard remains the priority. But Villanueva will make his job a little easier.

He was bought out of the last year of his Knicks contract so he could go chase a ring (plus the Knicks should play their younger guys to tank for a draft pick see what they’ve really got). For Dallas, they needed depth up front since trading Brandan Wright to Boston in the Rajon Rondo deal.

“I’m excited to be a part of a first-class organization,” Stoudemire said in a released statement. “To play alongside Dirk Nowitzki, Tyson Chandler and other great players, I think it’s a tremendous opportunity for me to compete for a championship.”

Stoudemire is not the high-flying athletic guy who played with the Suns, was a six-time All-Star and signed a max deal with the Knicks. Injuries have robbed us of that explosive guy.

However, Stoudemire is still good on the pick-and-roll and Dallas gets nearly 30 percent of its offense off that play (the only team that runs it more is Orlando). He can help them on the offensive end, but he’s not much of a boost on the other ends.

Still, for a veteran minimum he’s an upgrade over Greg Smith and Charlie Villanueva for the Mavs.