Outfielder Lonnie Smith of the Kansas City Royals testified today that he and five other major league baseball players, including 20-game winner Joaquin Andujar of the St. Louis Cardinals, have used cocaine.

In addition to Andujar, who is tied for the most victories in the major leagues this season, Smith also said during almost 4 1/2 hours on the witness stand in U.S. District Court that he also "had snorted" cocaine with Dick Davis, Gary Matthews and Dickie Noles during the 1981 season when they were Philadelphia Phillies teammates, and with Keith Hernandez and Andujar as teammates on the St. Louis Cardinals in 1982 and 1983. The Cardinals won the World Series in 1982.

Smith spoke to a packed courtroom on the first day of testimony in the cocaine trafficking trial of former Phillies clubhouse caterer Curtis Strong.

Other major leaguers are expected to follow on the stand. In the prosecution's opening statement, Assistant U.S. Attorney James Ross said the government will prove that Smith, Hernandez, Enos Cabell of the Los Angeles Dodgers, Dave Parker of the Cincinnati Reds, Jeff Leonard of the San Francisco Giants and former player John Milner all purchased cocaine from Strong, 38.

All of those players testified with immunity before a grand jury here. Hernandez and Lee Lacy of the Baltimore Orioles are expected to be the government's next witnesses when the case resumes Friday.

The defense, by contrast, today claimed that it is major league baseball and not Curtis Strong on trial, with Strong's lawyer Adam Renfroe Jr. saying the players and not his client are the dealers.

"We will show you these heroes are nothing but junkies," Renfroe said. "These hero-criminals actually sell drugs and are still selling drugs to baseball players around the league."

Smith, who testified his salary is $750,000 this season, said he paid $300 for one-eighth of an ounce of cocaine from Strong for himself, Andujar and Hernandez in late September of 1982 in Smith's room at the Pittsburgh Hilton. The players then used the cocaine that night, Smith testified.

About three weeks later, Andujar was the winning pitcher in the deciding game of the 1982 World Series.

Smith's testimony included his admission to being dependent on cocaine before undergoing rehabilitation in 1983 and admission that he had offseason dealings with Strong via express mail.

Baseball Commissioner Peter Ueberroth, who sources close to the case said may be called to testify for the defense, has called drug use the No. 1 problem in baseball today. Smith's appearance marks the first public glimpse into the area.

At least 12 current or former major league players were granted immunity for testifying before a federal grand jury here that began investigating cocaine sales to players after Pittsburgh Pirates pitcher Rod Scurry admitted in April 1984 to having a cocaine problem.

Seven men from outside baseball were indicted May 31 by the grand jury. Three have pleaded guilty and are awaiting sentencing.

Smith denied he had sold cocaine for a profit, saying he only purchased it for Andujar and Hernandez when they requested it. He testified that, when he became a Cardinal in 1982, Andujar introduced him to his St. Louis connection, whom Smith identified as Luis Martinez.

Federal Judge Gustave Diamond allowed Smith to testify about his alleged cocaine purchases outside the Western District of Pennsylvania. That opened the door for U.S. Attorney J. Alan Johnson to establish that Smith started using cocaine during winter baseball in Venezuela in 1977 and intensified that use until Smith went to Cardinals Manager Whitey Herzog on June 9, 1983.

"I stayed up all night using it," Smith testified. "I found myself too jittery and uncontrollable to play (on that date). I went to the manager's office. I told him I had a cocaine problem and I wanted help." Three days later Smith checked into the Hyland Center for alcohol and chemical abuse in St. Louis. He was a patient there for four weeks.

In addition to testifying about cocaine use, Smith named six members of the 1980 Philadelphia Phillies, including Pete Rose and Greg Luzinski, as using "greenies" or "uppers" (amphetamines) during that season. The others he named were Larry Bowa, Randy Lerch, Bake McBride and Nino Espinosa.

The names of Rose, Luzinski, Bowa and Lerch were reported in newspaper accounts in Philadelphia at that time.

Much of the afternoon was spent with defense counsel Renfroe trying -- somewhat unsuccessfully -- to attack Smith's credibility. After one question, Diamond broke in, pointed a finger at Renfroe and said to Smith, "Do not answer that question. Get on another subject."

Shortly thereafter, the judge cut off Renfroe's cross-examination and recessed court for the day. Afterward, Renfroe said he was through questioning Smith anyhow.

By then, Smith had told how he started using cocaine in the winter of 1977 in Venezuela when other players introduced him to it. "I got a high feeling where I felt strong and great. I felt a little bit invincible," he said. "I used it because the other guys did, and there wasn't much to do down there. I did it as something to pass time."

A minor leaguer at the time, Smith said he used cocaine only during winter baseball from 1977 to 1980 because he neither had a source nor could afford it. In 1981, he said, Davis introduced him to Strong, who he said subsequently sold cocaine to him in Pittsburgh, Philadelphia, New York and six to eight times by mail.

Asked by Johnson how many times he bought cocaine from Strong in 1981, Smith replied, "There were quite a few meetings. I can't say how many."

Smith said that when he was on the road with the Cardinals, he would telephone Strong and the defendant would take a bus or train to Pittsburgh and meet Smith in his hotel room. Smith said that Strong would give him a choice of three or four packets containing cocaine. Asked by Johnson, how he chose which one to buy, Smith replied, "You go for the one that's thickest."