Oscar Pistorius injured a professional boxer by firing a gun in a restaurant then asked his friend to take the blame, a court has heard.