GTA5 Online is a heavy resource game. You could buy a Core 2 Quad Q6600 for around $15-$20 on ebay. I bought 5 of them at $15 each to upgrade dualcore systems, however... Your motherboard needs to support the Core 2 Quad Q6600 and to make sure it does we would need to know what make/model motherboard your running. I made the mistake with one of my systems thinking it would take a Q6600 with no problems but the chipset on the motherboard maxes out with the Core 2 Duo or Pentium E series processor, so the motherboard will only run a dual-core processor.
GTA5 System Requirements:
Minimum = Core 2 Quad Q6600 2.4GHz. Phenom 9850 Quad-Core Black Edition. GeForce 9800 GT. Radeon HD 4870. 4 GB. Win 7 64. DX 10. 65 GB.
Suggested = Core i5-680 3.6GHz. Phenom II X4 810. GeForce GTX 750. Radeon R7 260X v2. 6 GB. Win 7 64. DX 11. Core i5-3470 3.2GHz.
If your looking to go as cheap as you can you might be able to get by with the system you have with the Q6600 2.4Ghz Quadcore for around $20, and find a GeForce 9800GT 1GB Video card for around $20-30. You will need full use of your 4GB RAM, so if your running the 32-bit version of Windows you would need to upgrade to a 64-bit OS to get full use of the 4GB. And this is to just meet the bare minimum requirements to play GTA 5. The video card being the weakest link in this build. You could get better performance teaming up a Q6600 quadcore with a better GTX card such as you might be able to find a GeForce GTX 260 896MB video card for around $50 or less used. I have a EVGA 216 core superclocked GeForce GTX 260 896MB RAM card and it plays games really well, however some newer games wont play well on this card because there are some heavy hitter games out there that require Core i7 or 8-core AMD CPU and GTX 750 or better video cards to play. My newest system is running a AMD FX-8350 with 16GB RAM and GeForce GTX 750ti 3GB and the game that I have that is the heaviest is Witcher 3. i dont have GTA5 to test it out for you with my GTX 260 to give you any ideas of frame rates etc. But the GTX 260 would be better than the minimum GeForce 9800 GT. The only drawback to going with a GTX video card is that you would need a power supply able to drive that cards power requirements and most people find themselves buying a power supply and video card upgrade as a pair upgrade if they are building new or finally upgrading out of standard video card performance to higher end video card.
But biggest thing before spending any money and making a upgrade plan is to know what motherboard you have and how much money in budget do you have as well as what kind of performance are you looking for. Such as just being able to play it with occasional lag and longer load times, no occasional lag and around 30 fps, or maximum settings and fastest load times. How much money you have to work with will be a big factor in what kind of a system we can suggest for you or upgrade of this system vs building or buying a new system.