An amateur footballer has credited the quick-thinking of his teammates with saving his life after suffering a cardiac arrest on the pitch.