Now for the fun part. We're going to get you going on how to edit. I have constantly been asked by people how to do the car sales edit.. so I will tell you how here.
*NOTE* I have warned over and over about messing with money. If your account becomes total earned glitched.. do not be mad at me. I am simply feeding the demand of people asking me how it's done.
Now that we have our script running and it's waiting for something to do while being ran through our command key, let's give it something to do. GTALUA download comes with its list of natives or you can use the link I gave you if you want to expand your view on what can be accomplished through natives. Since we're adjusting our car sales we will be using set_int.
In GTALUA to direct your script to the natives you will need to add a natives. before calling anything! If you don't have this it WILL not work.
Navigate to:
Code:
print("My generic template.")
Under it lets begin to add in our code, we've found that we need to use the natives to call our stat edit as well as found out we need set_int:
Code:
natives.STATS.STAT_SET_INT
Perfect! We've so far told the script that on our key down it will adjust the natives stats. But there is a major problem... the script doesn't know where to actually adjust these at. We need to point it there. In our natives you will see a GET_HASH_KEY under GAMEPLAY which can as it says get the hash key for any of the multiplayer stats and etc. Again we need to use natives to access it, so our script should now look like this:
Code:
natives.STATS.STAT_SET_INT(natives.GAMEPLAY.GET_HASH_KEY
We've now successfully told the script we need to change the integer of a stat located in a hash that we're going to find... but we still haven't told it what stat and to which of our characters to apply it too. In our mpstatsettup we need to find our car sales stat with a simple CTRL-F. I keyword searched for EARN MONEY to get to our earned section and found,
Code:
<stat Name="MONEY_EARN_SELLING_VEH" Type="int" SaveCategory="0" online="true" profile="true" ServerAuthoritative="true" FlushPriority="15" characterStat="true" Owner="coder" Comment="Money Earn in Selling Vehicles" />
As you can see the mpstatssetup will give you all information needed to finish the script. It tells you that its a integer type, it's stat name and even a comment on what it does (despite me telling you what it does). Now lets take it and finish our script. We're going to apply this to all characters using the MP command and set it to true (so it's active). Finish your script to look like this,
Code:
natives.STATS.STAT_SET_INT(natives.GAMEPLAY.GET_HASH_KEY("MP0_SELLING_VEH"),*INTEGER AMOUNT HERE TO ADJUST CAR VALUE TO*, true)
You will need to copy that line twice and paste it below the the original. In the two copied replace MP0 with MP1 and MP2 in the other so it applies to all characters. Save your script and try it ingame. You can even add a print under the lines above for a confirmation it worked. Print format - print("infohere")