U.S. special envoy Philip C. Habib returned to Lebanon today from Israel, where he apparently fashioned a cease-fire that went into effect within hours of his arrival. Earlier, Israeli land, sea and air forces had bombarded West Beirut in another round of the concerted attacks that began shortly after Habib left here seven days ago.

The cease-fire, the seventh of the war, took hold at 10:30 p.m. (4:30 p.m. EDT). Today's raids hit residential areas within Beirut as well as in its southern suburbs that house Palestine Liberation Organization offices. Palestinian gunners fired back, especially after nightfall, and their rocket launchers sent salvos toward Israeli positions in the Christian sectors of the capital and its environs.

Former prime minister Saeb Salam appealed to Habib to pressure Israel to restore power and water supplies cut off since Monday.

Yesterday's Israeli attacks hit some civilian areas in addition to what the Israelis said were guerrilla targets. Today's Israeli bombardment struck more apartment buildings in the once-elegant Raouche and Light House seafront areas and a Lebanese gendarmerie barracks. All are well within the center of the predominantly Moslem western sector of the capital.

Artillery, tank fire and warplanes also struck at targets in the much battered shantytown southern suburbs near Beirut Airport and the Arab University area that includes the PLO offices.

Israel Radio reported heavy fighting less than an hour before the cease-fire was to take effect. It said that Palestinians shelled the Christian suburb of Baabda in East Beirut and that Israeli forces returned the fire.

The air raids lasted one hour in the late morning and artillery fire continued intermittently throughout the day after the heaviest nighttime artillery duels of the war.

Wafa, the Palestinian news agency, reported 28 dead or wounded by midday. It said 247 persons had been killed and 395 wounded since Habib left on his mission last Thursday to confer with Syrian, Saudi, Egyptian, Italian, Jordanian and Israeli officials.

Lebanon's state radio said that one Israeli shell hit the Mukassad Hospital in West Beirut near the central Corniche Mazraa thoroughfare.

The International Committee of the Red Cross, appealed to all combatants to "spare the civilian population" and respect hospitals, clinics and orphanages. The Swiss humanitarian organization prepared detailed maps showing the hospitals and clinics set up since the invasion to handle casualties within neighborhoods.

The updated maps were to be handed to the Israeli Army, the third such undertaking of the war, in hopes the invaders would spare the hospitals and Red Cross installations. Past Israeli gunfire and bombs have severely damaged a number of hospitals in West Beirut and elsewhere in the country.

On the diplomatic front, politicians and analysts appeared confused by Israeli Prime Minister Menachem Begin's assertion that Habib had promised to report back within 48 hours to say whether the Palestinians were "unequivocally committed" to leaving Beirut.

The analysts noted that PLO Chairman Yasser Arafat agreed in principle almost a month ago in a signed document to quit Beirut and Lebanon. The ensuing problems--which Habib has dealt with in his just-concluded trip--have concerned how, when and to what country or countries the Palestinians would go.

The PLO has maintained that its fighters would leave only after an Israeli partial disengagement, the arrival of an international force, and negotiations with the Lebanese authorities.

Ex-premier Salam, a vital channel between Habib and the Palestinians, said of Israeli reports that Egypt, Jordan and Syria had agreed to take in PLO troops, "I have some reason to believe it is true."

Salam, who reported he had talked on the telephone to both King Fahd of Saudi Arabia and Egyptian President Hosni Mubarak, said he "got the impression that Habib has obtained something," that "he has made some progress." He suggested that a possible solution to the withdrawal problem would be to have the Israelis, Palestinians and international force that will oversee the operation all act simultaneously.

The PLO has voiced fears that the Israelis would move against its fighters if they started withdrawing before the international force arrived to separate the combatants. The Israelis who have rejected this argument, fear that the Palestinians would continue to stall after they had achieved such a disengagement of forces.

Salam was visibly disturbed by the continued pounding of West Beirut, many of whose remaining residents are Sunni Moslems like himself. "The American University Hospital got hold of me and said 'Please, SOS.' They want to close down. So does the Moslem charity Makassad Hospital.

"How can they get fuel for their hospital generators because of the Israeli blockade? We have no light, no water. Tell the world that women and children have no water. They cannot sleep. Don't you see this overwhelming catastrophe?"

For many residents of West Beirut, hardened by seven weeks of siege, these practical considerations appeared to outweigh the outcome of Habib's foreign visits designed to find an honorable exit for the Palestinian guerrillas and save West Beirut from piecemeal destruction.

Too many dashed expectations since the Israelis invaded June 6 have dampened West Beirutis' hopes of a quick resolution of their ordeal. Nor were great hopes placed on the longevity of the fresh cease-fire.

Symptomatic of West Beirut's mood was the angry reaction of a doctor watching rescue workers digging through rubble of an eight-story building bombed yesterday by Israeli war planes. The death toll there was variously given as 84 to 120, mostly refugees who had fled the southern suburbs early in the conflict.

Turning on a television team, the doctor said of the foreign audience for which its film was destined: "Your people, they watch television, they watch this. They have a drink, they go to bed and the next morning no one will lift a finger to stop this."