Mr. Hayes, the star of "Will and Grace" and "Promises, Promises," joins Will Sasso in a film about the slapstick trio that will be directed by Peter and Bobby Farrelly.