Vacuum leak. It could be a hose off the intake plenum, the vacuum booster on the brake pedal or the PCV valve and it's related components. Runs good cold because the injectors are very rich in that mode.
You say the car smelled bad after you turned it off. What did it smell like. Gas? Rotten egg smell? Overheated? Burning oil?