This guy’s already cashed out — but that didn’t stop his pals from paying him a macabre tribute.

Henry Rosario Martinez, a 31-year-old avid gambler, died earlier this month from booze and an overdose of prescription pills in his hometown of Barceloneta, Puerto Rico.

Before Martinez was buried, the man’s dad had undertakers embalm his son, dress him in sunglasses and casual clothes and prop him up at a poker table so loved ones could see him one more time, doing what he enjoyed, CEN reported.

A full house of friends gathered around Martinez’s corpse, anted up the memories and snapped pictures of him at the poker table, with a full stack of chips in front of him.

Jose Melendez, owner of Eterna Luz Funeral Services, admitted he’s never done a job quite like this — but said it’s not unusual for grieving loved ones to request an arrangement to show how the dearly departed lived.

”It’s the first time we ever did this here. But we take it was something normal because this kind of things have been done in other parts of our country,” Melendez said.