NO!
yes
It would help if you stated what city you are asking about.
Is it illegal to shoot a pellet gun in the City Limits of Quincy IL>
no
You will need to check with the Costa Mesa Police dept.
The answer will depend on the city and the local and state law.
Contact your local police for current and correct information.
The way the law reads is, "It's illegal to launch a projectile of any type with in the city limits. Pellet gun, slingshot, bow and arrow, etc, etc.
It depends on the model and the caliber of the Pellet gun.
The distance that a pellet gun can shoot is determined by the power source that the gun has. Some will shoot a few hundred feet while others with more power will shoot several hundred yards. The weight of the pellet also has an effect on the distance that it travels.
It's perfectly legal to possess one within city limits. Whether you can actually shoot it within city limits may be a different matter, however.