DO NOT BUY it until the seller has it diagnosed!!!
Recently bought a 2003 330i ZHP with 34,000 miles and under BMW warranty with "Service Engine Soon" light on. Since it was under factory warranty and the price seemed right ($5,000 below market), I took a gamble. Two days after purchase, the dealer took it in for a more than a month long service period. Over $12,000 worth of BMW dealer parts cost and labor was billed to BMW. (The warranty work was done with PUMA supervision, BMW's warranty work procedure and authorization arm.) It was released as "running to BMW specs." I was amazed and appreciated what the BMW dealer did and what the BMW warranty covered.
However, the problem was not resolved. After a break-in period for the new cams and lifters, I decided to push the engine and when it accerated to 5000 RPM, the dreaded "Service Engine Soon" light came on and the engine went into a "limp home mode." It cleared up after 5 minutes of driving and then repeated, when I again accelerated up to 5000 RPM.
Went back into the shop again. It has been over two weeks, the head has been taken off to inspect the valves as there is some claim that the valves were bent. To date, there is carboning of the exhaust valves in number 5 and 6. The vacuum test showed that the valves were not leaking. That was over 5 days ago. There was no evidence that valves hit the pistons.
I think there is a mixture problem which the replacement of the cams, lifters, and other related parts did not address. Perhaps it may be in the fancy variable intake valve lift in the place of throttle plate that may be malfunctioning in number 5 and 6 cylinders. Or, plugged cats.
The moral of the story to me is: Don't Buy It Even If It Is Under Warranty!!!
Have the seller have it diagnosed at the dealer or a reputable BMW garage and fixed, before you think about buying it. Especially in your case as there is not factory warranty available.