Kenny Smith says he's praying for his good friend and ex-teammate, Danny Ainge ... and says his heart attack should send a message to retired players -- take care of your health!
The Boston Celtics GM was treated for a mild heart attack earlier this week in Milwaukee ... but is expected to make a full recovery.
TMZ Sports spoke with The Jet at LAX on Thursday ... and Smith says there's actually some positive that can come out of this situation.
"It's important for guys who are retired to keep a type of awareness of their body, and the health of their body, the way they do when they're playing. A lot of us don't," Smith tells us.
"So hopefully this could be messages to a lot of former players that are still out there now not playing anymore."
Smith and Ainge go way back ... they played together from 1988-1990 on the Sacramento Kings, and have been friends ever since.
"Pray for Danny."