Check through the viewfinder. On my K10D if the hexagon at the bottom centre of the viewfinder is flashing it is indicating that the camera has not focused. If it is not focused it will not let you take a photo, as nimbus correctly points out.
You can either change this using manual focus or changing the setting through the control panel.