SACRAMENTO, Calif. (AP) Three weeks ago, Ryan Anderson scoffed at the idea of Houston becoming the first team in NBA history to attempt 50 3-pointers in one game.

Now that it happened, Anderson is fully convinced the Rockets can and will do it again.

James Harden had 23 points, 10 rebounds and 10 assists in his fourth triple-double of the season, leading the Rockets to a 117-104 victory over the Sacramento Kings on Friday in their record-setting night.

''That's this style of play that we built around James . and we have shooters,'' said Anderson, who made three 3s and scored 13 points. ''The great part about it, it didn't seem like we took 50. They were in rhythm, they were good looks and those are shots we normally take.''

The Rockets went 21 of 50 from beyond the arc and came within two makes of matching the single-game record they already share with the Orlando Magic.

The Rockets made eight 3s in the first quarter, six in the second, three in the third and four in the fourth. Their record for attempts came on just 85 shots overall.

''I don't mind it but I'll like to get the record for the most makes, not just the most attempts,'' Houston coach Mike D'Antoni said. ''If that's what they're giving us, that's what we'll take. We had good looks, and if a guy has a good look then he's free to shoot it.''

Trevor Ariza added 18 points and nine rebounds, while Clint Capela scored 17 points to lead Houston to its eighth win in the last nine meetings.

DeMarcus Cousins had 32 points and nine rebounds for Sacramento despite being hindered by foul trouble much of the second half. Cousins made four consecutive 3-pointers late in the fourth quarter when the Kings pulled within 112-104.

''If we want to be the team that just lets teams come in here with automatic `W's . that's just what's going to happen if we continue to play this way,'' Cousins said. ''We've got to hold ourselves accountable, take responsibility for it and change these mistakes. This probably won't be the last time we see a team get hot like that.''

Sacrament coach Dave Joerger said the Kings' slow start was too much to overcome.

''We didn't come in and bring enough force early in the game,'' Joerger said. ''They came in very focused, we came in definitely too slow. They got too many loose balls (and) made 3s.''

Ariza led Houston's 3-point barrage, going 6 of 11. Eric Gordon added four while Harden had three. Gordon finished with 14 points, one of seven Rockets in double figures.

TIP-INS

Rockets: Houston led by as much as 29 but had to hold off Sacramento's late surge to win in the opener of its five-game road trip. .. Ariza made four 3s in the first quarter. ... Anderson grew up just outside of Sacramento and was a big Kings fan.

Kings: Joerger juggled his lineup after halftime and replaced Ty Lawson with Arron Afflalo. Afflalo started 14 of Sacramento's first 15 games but Joerger has been experimenting with a smaller backcourt at times. . Joerger was given a technical foul in the fourth quarter.

ROCKETS' DEEP STREAK

Houston has made at least 10 3-pointers in its last 15 games, one shy of the NBA record set last year by Golden State and matched later in the season by Cleveland. The Rockets last failed to reach double digits beyond the arc in the season opener, when they made seven.

COUSINS' BIG BURST

Cousins set a career-high with five 3s, four coming in a two-minute stretch late in the fourth quarter. The 6-foot-11 center also picked up a technical foul along with Houston's Patrick Beverley after the two exchanged words with 44.5 seconds remaining.

UP NEXT

Rockets: Play at Portland on Sunday in the second meeting between the teams this season. Houston beat the Trail Blazers 104-83 on Nov. 17.

Kings: Travel to Brooklyn to face the Nets on Sunday. Cousins averaged 32 points and more than 11 rebounds in two games against Brooklyn in 2015.

Copyright 2016 by STATS LLC. Any commercial use or distribution without the express written consent of STATS LLC is strictly prohibited.