Tetramur Posted February 14, 2021 Share Posted February 14, 2021 (edited) It is well-known that in GTA SA the highest quantity of money you can have is 999999999. Why is it so and how I can make it cap at another value (say, 2147483647) by editing game exe-file? Edited February 14, 2021 by Tetramur Link to comment Share on other sites More sharing options...
Jack Posted February 14, 2021 Share Posted February 14, 2021 static int CPlayerInfo::Process(CPlayerInfo *playaInfo, int number) { // 0x56F8D0 // some function stuff ... // money stuff: int playaMoney = playaInfo->m_nMoney; if (playaMoney >= 999999999) { playaMoney = 999999999; } playaInfo->m_nMoney = playaMoney; int AddedMoney = playaInfo->m_nDisplayMoney; if (AddedMoney >= 999999999) { AddedMoney = 999999999; playaInfo->m_nDisplayMoney = AddedMoney; } return AddedMoney; } 999999999 = 0x3B9AC9FF = FF C9 9A 3B Binary search for FF C9 9A 3B provides 4 results only (all 4 are used for the money limit): injector::WriteMemory<DWORD>(0x571781 + 1, 0x7FFFFFFF); injector::WriteMemory<DWORD>(0x571788 + 1, 0x7FFFFFFF); injector::WriteMemory<DWORD>(0x571799 + 1, 0x7FFFFFFF); injector::WriteMemory<DWORD>(0x5717A0 + 1, 0x7FFFFFFF); MallyGameZ 1 Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
Tetramur Posted February 14, 2021 Author Share Posted February 14, 2021 (edited) You explained why I couldn't find these bytes. I thought I should look for them in plain format: 999999999 = 0x3B9AC9FF = 3B 9A C9 FF. But it turned out that I should look for them in reverse as you said. Thank you. I will test various values for this limit especially FF FF FF 7F (0x7FFFFFFF = 2147483647). By the way, if I try to have more money than $2147483647, does that mean that entire sum will go negative? Edited February 14, 2021 by Tetramur Link to comment Share on other sites More sharing options...
zyenapz Posted February 22, 2021 Share Posted February 22, 2021 On 2/15/2021 at 2:28 AM, Tetramur said: By the way, if I try to have more money than $2147483647, does that mean that entire sum will go negative? If I remember correctly, the value will "wrap around" (reset to 0) kind of like how an odometer will reset to 0 after reaching 999999. Link to comment Share on other sites More sharing options...
Tetramur Posted February 22, 2021 Author Share Posted February 22, 2021 7 hours ago, zyenapz said: If I remember correctly, the value will "wrap around" (reset to 0) kind of like how an odometer will reset to 0 after reaching 999999. I tested it by loading a save game while I already had $999.999.999. I edited exe file as I stated. 1. When I sat in a taxi (this action alone adds $12), I started to have $1.000.000.011. 2. I could get to the limit using Crazy Trainer and burglary submission. I achieved $2.147.483.647 but now I have to be extremely careful about this limit and sum of rewards if I work with 13.37% Master Saves because I tried to transcend this limit of $2.1B and it went to negative values. This is thing to be avoided. This has consequences as increasing money by $5.000 adds 1 point to criminal rating, so you can have a theoretical limit of 429.496 points of CR. But if you transcend the limit, CR will be also gone. zyenapz 1 Link to comment Share on other sites More sharing options...
zyenapz Posted February 22, 2021 Share Posted February 22, 2021 55 minutes ago, Tetramur said: I tested it by loading a save game while I already had $999.999.999. I edited exe file as I stated. 1. When I sat in a taxi (this action alone adds $12), I started to have $1.000.000.011. 2. I could get to the limit using Crazy Trainer and burglary submission. I achieved $2.147.483.647 but now I have to be extremely careful about this limit and sum of rewards if I work with 13.37% Master Saves because I tried to transcend this limit of $2.1B and it went to negative values. This is thing to be avoided. This has consequences as increasing money by $5.000 adds 1 point to criminal rating, so you can have a theoretical limit of 429.496 points of CR. But if you transcend the limit, CR will be also gone. That sounds bad. That's the reason for the 999,999,999 limit - to prevent people from reaching the actual limit of the 32-bit integer, which can make the game do all sorts of weird stuff. Tetramur 1 Link to comment Share on other sites More sharing options...
Tetramur Posted February 22, 2021 Author Share Posted February 22, 2021 2 hours ago, zyenapz said: That sounds bad. That's the reason for the 999,999,999 limit - to prevent people from reaching the actual limit of the 32-bit integer, which can make the game do all sorts of weird stuff. When you repeatedly do Vigilante submission actual quantity of money eventually starts to have very interesting and highly erratic behaviour. I think it should happen at 500+ levels. Imagine this: you are near end of entire series of missions (when riots occur at LS), and you transcend this limit - this makes LV dangerous for you too as guards with serious ammo will attack you at first sight. Anyway, I want to know total sum of all rewards given by (sub-)missions which don't make part of 13.37% Master Save because any number added to $2.1B limit will negate the value. zyenapz 1 Link to comment Share on other sites More sharing options...
zyenapz Posted February 23, 2021 Share Posted February 23, 2021 10 hours ago, Tetramur said: When you repeatedly do Vigilante submission actual quantity of money eventually starts to have very interesting and highly erratic behaviour. I think it should happen at 500+ levels. I haven't checked the source code myself. However, I did experience a similar thing happening in other games like Mount and Blade: Warband. When you get past the Level 62 'limit' for example, then the whole game just breaks. When you visit the lair of an enemy faction then they will spawn infinitely because their spawn limit is tied to your level. What you are experiencing when you go past 500+ levels in Vigilante might be the same thing. Link to comment Share on other sites More sharing options...
MallyGameZ Posted March 22 Share Posted March 22 (edited) What file do I open in the gta san adreas directory to edit the money code as seen above in Jack's post? Edited March 22 by MallyGameZ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now