I'd recommend taking a look at the recent D&D Gamma World game, and how they abstract weapons, including guns.
For ranged weapons, you have three choices to make: one or two handed; light or heavy; "gun" or "weapon"
- one handed weapons do less damage and have less range when compared to two handed weapons.
- light weapons are more accurate and use Dex or Int as the attack stat, but do less damage when compared to heavy weapons which use Str or Con.
- "guns" require that you pay attention to ammo, have longer range, and for light weapons increase accuracy, while for heavy weapons increase damage when compared to "weapons"
Ammo for "guns" is handled with a very simple mechanic: Shoot once per encounter, and you never run out. Shoot many times in an encounter, and at the end of the encounter, you're out of ammo and need to find some more.
Non guns are assumed to have recoverable/easily findable/easily makable ammunition, and so you can shoot as often as you like, and never run out.
Examples:
A sling or a hand crossbow could both be light, one handed "weapons": Dex or Int +3 to attack, 1d8 damage, range 5
A tommy gun or a hunting rifle could both be heavy, two handed "guns": Str or Con +2 to attack 2d10 damage, range 20.
Best Answer
Possibly, it's up to the DM!
It is the DM, generally, who chooses the campaign setting, i.e. what "world" the players' adventures are going to take place in.
There are various published settings or a DM is free to create his own.
Most of the established settings use a more fantasy-medieval level of technology (with magic of course). Some settings - such as Eberron - are rather more advanced either technologically or in a 'magi-tech' kind of way.
A DM making his own campaign setting can choose any level of technology he likes, although the basic rules are geared more towards medieval fantasy. The Dungeon Master's Guide does contain optional rules on guns however, if you decide they exist in your campaign!