It’s not uncommon for a coach to text a player a message that expresses encouragement and belief in him. But for that player, nothing replaces self-confidence.

So while Kings coach Michael Malone used a text message to convey those sentiments to Jimmer Fredette recently, it didn’t have the effect of Fredette seeing his shots go through the hoop.

Fredette took a game that was on the verge of being yet another loss for the Kings and changed it by making shots. He had a career-high 24 points, and the Kings ended their three-game losing streak Wednesday night with a 106-101 overtime win over the New York Knicks at Madison Square Garden.

Fredette needed the boost from knowing he could make an impact by playing as aggressively as he did Wednesday, forcing Malone to keep him in the game.

“I needed it as well (as the team),” Fredette said. “I tried to go out and be aggressive, but I was able to play a lot more tonight, and it just felt good to play that many minutes and be able to contribute and really help this team win.”

Fredette played a season-high 27 minutes and established career bests for baskets (nine) and three-pointers (six).

Extended minutes for Fredette was a change. He usually fills in for Isaiah Thomas at point guard to start the second and fourth quarters, playing only short stints.

Following a lackluster loss to Cleveland, the Kings (18-35) trailed by 13 in the first quarter. But Fredette sparked a 17-4 run in the second quarter, making his first six shots and scoring 15 in the period.

During the first three losses of this trip, Sacramento’s bench had underperformed.

“My mindset was a little bit better,” Fredette said. “I knew that we were in a hole and we needed this win badly going into the All-Star break. We didn’t want to go in on an 0-4 trip, really thinking twice about our team. We wanted to end on a positive note.”

Fredette had high hopes for this season, but he has yet to start and became the backup point guard only after Greivis Vasquez was traded to Toronto in December.