Yeah, that sounds like Pathfinder (not D&D
).
As for class, it really depends on what you're after. For example, a Wizard or Druid is probably stronger, even at L5, given the gold, but it sounds like you want to play a gunslinger at which point the actual gunslinger class or a gun archetype for one of the others is going to be necessary. Also what firearms rules? "Guns everywhere" makes guns a hell of a lot more attractive than "emerging guns".
Firearms in PF are a bit borked. They're actually
really bad unless you invest in them and the Gunslinger is mostly about getting around all of their drawbacks. Apparently the Gunslinger gets a bit of a reputation for being overpowered but this is mostly due to this "swinginess" of guns - once you've invested in them loads and gotten around all or most of those drawbacks, you're mostly left with their strengths which include ridiculous things like hitting touch AC. Gunslingers can pump out a lot of damage (at least at L5), especially if they get lucky and hit, and they're also especially good against some of the biggest and toughest foes like dragons. However this damage is pretty much all they can do, so really they are quite weak. They're just super-focused at doing one specific thing really well.
When you say Desperado, do you mean
the Path of War class? If so, you probably want to take this - it is way more powerful than the Gunslinger. You don't get Dex-to-damage at L5 but Tempest Gale Stance gives you Cha-to-damage instead, and at L5 you also get Super-Rapid Reload which lets you full attack with guns (you only get one attack at L5, but take Rapid Shot) and Blackpowder Prowess which gives another +1 to AB, damage and CMB (if not for this I'd suggest considering getting Elemental Flux somehow for Elemental Flux Stance, but TGS+this is pretty good too). In fact L5 is an amazingly good level for the Desperado since you also get L1 Gunslinger Deeds.
PoW is a bit too good at dealing shedloads of damage and could have done better focusing on everything
except that, but Tempest Gale does also offer you a lot of "trick shot" manoeuvres and so on which does help make you a bit more interesting than a guy who just mows down whatever's stood 20ft in front of him. By the way, you're still getting Gambits, Force of Personality (Cha to Will!), Warleader and access to Golden Lion, so you can help your team a bit too. Thus, this is probably going to be the more fun class also.
Without PoW, straight Gunslinger is reasonably viable up to L5, when you get Dex to damage. However it's going to struggle with such low cash. You pretty much have to take Rapid Reload, and unless you use alchemical cartridges too (which cost a bit more) you're still taking a move action to reload so no Rapid Shot. Gun Training makes your damage OK, but you also still need Deadly Aim really to take advantage of those touch AC attacks and up the damage to sensible levels, especially if you're stuck with only one attack.
The Trench Fighter is attractive because it gets Dex-to-damage at L3, earlier than anyone else, and only trades out Armour Training (maybe its second-lamest feature) for it and still gets all its bonus feats and stuff. It's way better than the base Fighter, and I'd be tempted even as a Desperado to take 3-4 levels of Fighter (but Desperado 5 is so good that I'd do that and maybe take Fighter later, rather than Fighter 4/Desperado 1 which would normally not be a bad option - you still get a L3 stance, but crucially you don't get the instant reload) - Desperado multiclasses well so you don't feel the pain so much when you go back to it later, and that way you get some more bonus feats and Dex
and Cha to damage... though that's probably overkill.
The Trench Fighters feats also really help a feat-starved fighting style, but I'd probably take some actual Gunslinger too. Note that the Fighter doesn't get a free gun or even firearm proficiency, making it all but useless on its own in an Emerging Guns game. Gunslinger also gets deeds which are pretty crucial - Quick Clear is an emergency backup and Deadeye lets you make touch attacks further away which, since you can't afford a Distance Pistol, is going to be a big deal in some cases.
But then, Gunslinger 1/Fighter 3/XXX 1 and Gunslinger 5 both get Dex to damage. Gunslinger gets +1 AC and 1 feat, plus more deeds, whereas Fighter gets 2 feats and Bravery (lame) and could take F4 for a third. It's whether the freedom of a feat choice is better than the deeds, really, but the first option potentially lets you take another class, too - sticking a level of Slayer on there, for example, might not hurt. Straight Gunslinger gets the Favoured Class (or "Pathfinder Hates Mutliclassing") advantage too - IMO this is worth considering if you're a Human or something who gets bonus grit, but it's not a big deal for a couple of hp.
I'd suggest Pistolero/Fighter to get the best of both world but losing Deadeye hurts if you can't buy a Distance weapon. Likewise, Trench Fighter works well with other firearm archetypes who might not get Dex to damage, but you may still wind up with the same problem.