No person within the corporate limits of the City shall fire or discharge any air pistol or air rifle or similar instrument in which the propelling force is a spring or air, unless it is a case of necessity. However, the use of such an instrument at rifle or pistol ranges or the use of such an instrument in connection with an amusement duly authorized by law, shall not be considered a violation of this section.