An 82-year-old man believed to have beEN keeping warm in a carpark where a fire broke out in a western Sydney unit block has died from cardiac arrest.

Fifteen residents had to be evacuated from the block when two cars caught fire on the first level car park in Parramatta about 4am on Monday, Fire & Rescue Superintendent Paul Johnson said.

Four people had to be rescued with ladders from two balconies on the government-housing building.

Three people were taken to hospital and treated for smoke inhalation.

A homeless man was found in the carpark suffering from serious smoke inhalation and he then went into cardiac arrest, Supt Johnson told AAP.

Firefighters and paramedics both worked on him but he couldn't be saved.

Residents have not been allowed to return to the building which has been intensely smoke-affected.