Originally posted by SMeK
OK thank you all for response. Just to make sure i got this table right. On the right side is distance and the numbers on black part is recommended F number. But what is ASA? I guess i must expermient with numbers under ASA (is that iso?) 200?
One more thing, i am not quite sure where i have read that but i found some people having problems with external flash units and pentax cameras with old M lens. When i will buy external flash of what i must be aware? I saw pentax 360 and 540 and there is written that they can work in manual and auto mode, so would i be able to use one of those flashes with M lens? Thank you once again but I am quite new in DSLR photography

ASA = ISO for our purposes, Yes.
After responding to your post, I tried the flash on my K7 (built in) and it's usable as Adam states. You can gain better control however (I think) with an external flash that is capable of auto mode. The problem is that with a completely manual lens such as your M50, the camera has no way of knowing what the Aperture is and P-TTL does not work at that point. Therefore, it just fires the flash at full output. The 360 and 540 are examples of flashes that work quite nicely in auto. There are far less expensive options however. As long as the flash meets the trigger voltage requirements (keep it below 12 volts to be safe), you're good to go. You simply tell the flash what ISO and Aperture you are using (to an extent you can pick the focal length on the 360 and 540 as well), and the flash will adjust the output accordingly.
Here are a few examples taken close up with a Pentax K 30mm f2.8 wide open using the AF540 in Auto mode.
These were taken at minimum focus distance, wide open, to show the blurring behind the subject (someone had asked to see it when I first got the lens).