The rule for S-corporations with shareholders who do work for the corporation is this: all distributions to the shareholder/employee will be treated first as wages/salary paid to the employee up until the point the employee has received reasonable compensation for all work the employee has ever done for the corporation. This means, for example, if the corporation paid you nothing for the first 5 years for the work you did and then at end of the 6th year made a large distribution to you, that distribution would be wage income to you up to the point where you have been paid reasonable compensation for all six years of work that you performed. For that wage income, the corporation must do the appropriate federal and state tax withholding, file the employment tax returns (Forms 941 and 940 for the feds and any required state returns), and issue the W-2.
In short, you are not required to make any payments or distributions to yourself in any year, but once you start taking it out, it comes out first as salary/wages to you until you have received reasonable compensation for all the work you have done for the corporation over the years. Reasonable compensation means the wage or salary that the corporation would have to pay some unrelated person (someone not a shareholder or related to the shareholder) it hired to do the same work; in other words, the typical salary/wage that companies are paying employees to do the work.