B1ack_Wh1te Posted July 29, 2017 Share Posted July 29, 2017 Hi How to add a new weapon to Ammunition? For example: in the section of assault rifles add minigun. Link to comment Share on other sites More sharing options...
deltaCJ Posted July 29, 2017 Share Posted July 29, 2017 You'd have to add the option in the main.scm external script. Link to comment Share on other sites More sharing options...
B1ack_Wh1te Posted July 29, 2017 Author Share Posted July 29, 2017 You'd have to add the option in the main.scm external script. Which parameter should be added to main.scm? Link to comment Share on other sites More sharing options...
kosticn101 Posted July 31, 2017 Share Posted July 31, 2017 (edited) ZAZ already did this. He added all heavy weapons (two rocket launchers, flamethrower and minigun) to the Ammu-Nations (but not as assault rifles, he added them in their own section).If you do this, you can't use your save files anymore and you will have to start the game from the beginning. Create a copy of entire data\script folder before proceeding. Find //-------------External script 60 (AMMU)--------------- here: https://pastebin.com/zjVNzqcnSelect all code after that till the end. Decompile main.scm using Sanny Builder, press Ctrl + F and search for External script 60. Replace all AMUNAT related code with the version from pastebin.Ie. //-------------External script 60 (AMMU)--------------REPLACE THIS CODE WITH THE ONE FROM PASTEBIN//-------------External script 61 (TATTOO)--------------- Use Ctrl + F to search for $AMMU_WEAPON_COST inside that code if you want to change prices for these weapons.Try to compile. Maybe you get an error Incorrect number of conditions and when you press Ok, this code will show: :SYND4_3650ifelse_jump @SYND4_3672wait 0jump @SYND4_3650 Replace it with: :SYND4_3650//if//else_jump @SYND4_3672//wait 0//jump @SYND4_3650 Compile.All Ammu-Nations will be locked when you start a new game, so you can compile this script and add it to the CLEO folder: {$CLEO}0000:while $Sweet_Total_Passed_Missions < 8 //Doberman wait 0 07FB: set_interior 'AMMUN1' access 1 07FB: set_interior 'AMMUN2' access 1 07FB: set_interior 'AMMUN3' access 1 07FB: set_interior 'AMMUN4' access 1 07FB: set_interior 'AMMUN5' access 1end0A93: end_custom_thread Game wont lock Ammu-Nations after you pass a Doberman mission, so there is no need for this script after that. If you don't want to edit main.scm search for CLEO mod, or create it yourself, that allows you to buy these weapons.http://www.gtagarage.com/mods/show.php?id=8199 Edited July 31, 2017 by kosticn101 Link to comment Share on other sites More sharing options...
B1ack_Wh1te Posted August 3, 2017 Author Share Posted August 3, 2017 (edited) ZAZ already did this. He added all heavy weapons (two rocket launchers, flamethrower and minigun) to the Ammu-Nations (but not as assault rifles, he added them in their own section). If you do this, you can't use your save files anymore and you will have to start the game from the beginning. Create a copy of entire data\script folder before proceeding. Find //-------------External script 60 (AMMU)--------------- here: https://pastebin.com/zjVNzqcn Select all code after that till the end. Decompile main.scm using Sanny Builder, press Ctrl + F and search for External script 60. Replace all AMUNAT related code with the version from pastebin. Ie. //-------------External script 60 (AMMU)--------------REPLACE THIS CODE WITH THE ONE FROM PASTEBIN//-------------External script 61 (TATTOO)--------------- Use Ctrl + F to search for $AMMU_WEAPON_COST inside that code if you want to change prices for these weapons. Try to compile. Maybe you get an error Incorrect number of conditions and when you press Ok, this code will show: :SYND4_3650ifelse_jump @SYND4_3672wait 0jump @SYND4_3650 Replace it with: :SYND4_3650//if//else_jump @SYND4_3672//wait 0//jump @SYND4_3650 Compile. All Ammu-Nations will be locked when you start a new game, so you can compile this script and add it to the CLEO folder: {$CLEO}0000:while $Sweet_Total_Passed_Missions < 8 //Doberman wait 0 07FB: set_interior 'AMMUN1' access 1 07FB: set_interior 'AMMUN2' access 1 07FB: set_interior 'AMMUN3' access 1 07FB: set_interior 'AMMUN4' access 1 07FB: set_interior 'AMMUN5' access 1end0A93: end_custom_thread Game wont lock Ammu-Nations after you pass a Doberman mission, so there is no need for this script after that. If you don't want to edit main.scm search for CLEO mod, or create it yourself, that allows you to buy these weapons. http://www.gtagarage.com/mods/show.php?id=8199 I already used Zaz script. In it there is a bug: if you add a new fifth weapon, Instead of it there will be a bit. How to fix it? Edited August 4, 2017 by Dyabda Link to comment Share on other sites More sharing options...
crashoverride93 Posted August 4, 2017 Share Posted August 4, 2017 It sounds like you need to talk to zaz about the script since he is the one that wrote it. Link to comment Share on other sites More sharing options...
B1ack_Wh1te Posted August 7, 2017 Author Share Posted August 7, 2017 Unfortunately, ZAZ does not answer. Link to comment Share on other sites More sharing options...
ZAZ Posted August 8, 2017 Share Posted August 8, 2017 I added 5 code blocks to the AMUNAT extern script (click)Search for this comment:----modification----to find itIt adds a submenue for heavy weapons and the 4 heavy weapons for purchase 00D6: if///////////////////////-------------------modification-------------------04A3: $AMMU_SELECTED_WEAPON == 35 // $ == any 004D: jump_if_false @AMUNAT_461105A9: s$AMMU_WEAPON_NAME = 'ROCKET' //0004: $AMMU_WEAPON_COST = 20000004: $AMMU_SELECTED_WEAPON_WEAPON_GROUP = 80004: $AMMU_SELECTED_WEAPON_MODEL = 3590002: jump @AMUNAT_4687:AMUNAT_461100D6: if04A3: $AMMU_SELECTED_WEAPON == 36 // $ == any004D: jump_if_false @AMUNAT_461205A9: s$AMMU_WEAPON_NAME = 'ROCKHS' //0004: $AMMU_WEAPON_COST = 30000004: $AMMU_SELECTED_WEAPON_WEAPON_GROUP = 80004: $AMMU_SELECTED_WEAPON_MODEL = 3600002: jump @AMUNAT_4687:AMUNAT_461200D6: if04A3: $AMMU_SELECTED_WEAPON == 37 // $ == any004D: jump_if_false @AMUNAT_461305A9: s$AMMU_WEAPON_NAME = 'FLAMET' //0004: $AMMU_WEAPON_COST = 19000004: $AMMU_SELECTED_WEAPON_WEAPON_GROUP = 80004: $AMMU_SELECTED_WEAPON_MODEL = 3610002: jump @AMUNAT_4687:AMUNAT_461300D6: if04A3: $AMMU_SELECTED_WEAPON == 38 // $ == any <------------ hardcoded weapon number004D: jump_if_false @AMUNAT_467705A9: s$AMMU_WEAPON_NAME = 'MINIGU' // minigun <------------ gxt to show weapon name0004: $AMMU_WEAPON_COST = 22000004: $AMMU_SELECTED_WEAPON_WEAPON_GROUP = 8 // <------------ weapon group0004: $AMMU_SELECTED_WEAPON_MODEL = 362 // <------------ model id0002: jump @AMUNAT_4687:AMUNAT_4677///////////////////////-------------------modification------------------- :AMUNAT_9510///////////////////////-------------------modification-------------------00D6: if or04A3: $AMMU_SELECTED_WEAPON_MODEL == 359 // $ == any 04A3: $AMMU_SELECTED_WEAPON_MODEL == 360 // $ == any 04A3: $AMMU_SELECTED_WEAPON_MODEL == 361 // $ == any 04A3: $AMMU_SELECTED_WEAPON_MODEL == 362 // $ == any <------------ model id004D: jump_if_false @AMUNAT_9613 06D1: v$9554 = "SHP_2H_LIFT" // v$ = string 06D1: v$9558 = "SHP_2H_LIFT_END" // v$ = string 0086: $9585 = $AMMU_X_SELLER // (float) 0009: $9585 += 0.231 0086: $9586 = $AMMU_Y_SELLER // (float) 0009: $9586 += 0.636 0086: $9587 = $AMMU_Z_SELLER // (float) 0009: $9587 += 1.053///////////////////////-------------------modification------------------- :AMUNAT_9955///////////////////////-------------------modification-------------------00D6: if or04A3: $AMMU_SELECTED_WEAPON_MODEL == 359 // $ == any 04A3: $AMMU_SELECTED_WEAPON_MODEL == 360 // $ == any 04A3: $AMMU_SELECTED_WEAPON_MODEL == 361 // $ == any 04A3: $AMMU_SELECTED_WEAPON_MODEL == 362 // $ == any <---------------------- model id004D: jump_if_false @AMUNAT_9978 06D1: v$AMMU_SELLER_ANIMATION = "SHP_2H_RET_S" // v$ = string 06D1: v$9566 = "SHP_2H_RET" // v$ = string///////////////////////-------------------modification------------------- :AMUNAT_10904///////////////////////-------------------modification-------------------0004: $9661[0] = 350004: $9661[1] = 36 // $9636 changed to $9661 0004: $9661[2] = 370004: $9661[3] = 38 // <--------------------------------- hardcoded weapon number0004: $9606 = 3 05A9: $2450($9616,12s) = 'GYM1_1' // Power <-- this is gxt entry for weapon group in shop menue0008: $9616 += 1 0004: $9615 = 1 0008: $9597 += 1///////////////////////-------------------modification------------------- :AMUNAT_12150///////////////////////-------------------modification-------------------00D6: if 05AD: s$9549 == 'GYM1_1' // POWER <-- this is gxt entry for weapon group in shop menue004D: jump_if_false @AMUNAT_1217905A9: s$2450[0] = 'ROCKET' // Rocket Launcher05A9: s$2450[1] = 'ROCKHS' // Heat Seeking Rocket Launcher05A9: s$2450[2] = 'FLAMET' // Flamethrower05A9: s$2450[3] = 'MINIGU' // Minigun <------------ gxt to show weapon name0004: $9633[0] = 350004: $9633[1] = 360004: $9633[2] = 370004: $9633[3] = 38 // <--------------------------------- hardcoded weapon number0004: $9661 = 40002: jump @AMUNAT_12179///////////////////////-------------------modification------------------- You wanna add a weapon to the asault rifle menue? Sorry, but i'm too lazy to find out how to do.You wanna add a weapon to code block mod for the heavy weapon menue? Sorry, but i'm too lazy to explain, but it's really easy.It just needs to expand the code blocks as well as the last jump label of the first code block RyanDri3957V 1 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
B1ack_Wh1te Posted August 9, 2017 Author Share Posted August 9, 2017 I added 5 code blocks to the AMUNAT extern script (click) Search for this comment: ----modification---- to find it It adds a submenue for heavy weapons and the 4 heavy weapons for purchase 00D6: if///////////////////////-------------------modification-------------------04A3: $AMMU_SELECTED_WEAPON == 35 // $ == any 004D: jump_if_false @AMUNAT_461105A9: s$AMMU_WEAPON_NAME = 'ROCKET' //0004: $AMMU_WEAPON_COST = 20000004: $AMMU_SELECTED_WEAPON_WEAPON_GROUP = 80004: $AMMU_SELECTED_WEAPON_MODEL = 3590002: jump @AMUNAT_4687:AMUNAT_461100D6: if04A3: $AMMU_SELECTED_WEAPON == 36 // $ == any004D: jump_if_false @AMUNAT_461205A9: s$AMMU_WEAPON_NAME = 'ROCKHS' //0004: $AMMU_WEAPON_COST = 30000004: $AMMU_SELECTED_WEAPON_WEAPON_GROUP = 80004: $AMMU_SELECTED_WEAPON_MODEL = 3600002: jump @AMUNAT_4687:AMUNAT_461200D6: if04A3: $AMMU_SELECTED_WEAPON == 37 // $ == any004D: jump_if_false @AMUNAT_461305A9: s$AMMU_WEAPON_NAME = 'FLAMET' //0004: $AMMU_WEAPON_COST = 19000004: $AMMU_SELECTED_WEAPON_WEAPON_GROUP = 80004: $AMMU_SELECTED_WEAPON_MODEL = 3610002: jump @AMUNAT_4687:AMUNAT_461300D6: if04A3: $AMMU_SELECTED_WEAPON == 38 // $ == any <------------ hardcoded weapon number004D: jump_if_false @AMUNAT_467705A9: s$AMMU_WEAPON_NAME = 'MINIGU' // minigun <------------ gxt to show weapon name0004: $AMMU_WEAPON_COST = 22000004: $AMMU_SELECTED_WEAPON_WEAPON_GROUP = 8 // <------------ weapon group0004: $AMMU_SELECTED_WEAPON_MODEL = 362 // <------------ model id0002: jump @AMUNAT_4687:AMUNAT_4677///////////////////////-------------------modification------------------- :AMUNAT_9510///////////////////////-------------------modification-------------------00D6: if or04A3: $AMMU_SELECTED_WEAPON_MODEL == 359 // $ == any 04A3: $AMMU_SELECTED_WEAPON_MODEL == 360 // $ == any 04A3: $AMMU_SELECTED_WEAPON_MODEL == 361 // $ == any 04A3: $AMMU_SELECTED_WEAPON_MODEL == 362 // $ == any <------------ model id004D: jump_if_false @AMUNAT_9613 06D1: v$9554 = "SHP_2H_LIFT" // v$ = string 06D1: v$9558 = "SHP_2H_LIFT_END" // v$ = string 0086: $9585 = $AMMU_X_SELLER // (float) 0009: $9585 += 0.231 0086: $9586 = $AMMU_Y_SELLER // (float) 0009: $9586 += 0.636 0086: $9587 = $AMMU_Z_SELLER // (float) 0009: $9587 += 1.053///////////////////////-------------------modification------------------- :AMUNAT_9955///////////////////////-------------------modification-------------------00D6: if or04A3: $AMMU_SELECTED_WEAPON_MODEL == 359 // $ == any 04A3: $AMMU_SELECTED_WEAPON_MODEL == 360 // $ == any 04A3: $AMMU_SELECTED_WEAPON_MODEL == 361 // $ == any 04A3: $AMMU_SELECTED_WEAPON_MODEL == 362 // $ == any <---------------------- model id004D: jump_if_false @AMUNAT_9978 06D1: v$AMMU_SELLER_ANIMATION = "SHP_2H_RET_S" // v$ = string 06D1: v$9566 = "SHP_2H_RET" // v$ = string///////////////////////-------------------modification------------------- :AMUNAT_10904///////////////////////-------------------modification-------------------0004: $9661[0] = 350004: $9661[1] = 36 // $9636 changed to $9661 0004: $9661[2] = 370004: $9661[3] = 38 // <--------------------------------- hardcoded weapon number0004: $9606 = 3 05A9: $2450($9616,12s) = 'GYM1_1' // Power <-- this is gxt entry for weapon group in shop menue0008: $9616 += 1 0004: $9615 = 1 0008: $9597 += 1///////////////////////-------------------modification------------------- :AMUNAT_12150///////////////////////-------------------modification-------------------00D6: if 05AD: s$9549 == 'GYM1_1' // POWER <-- this is gxt entry for weapon group in shop menue004D: jump_if_false @AMUNAT_1217905A9: s$2450[0] = 'ROCKET' // Rocket Launcher05A9: s$2450[1] = 'ROCKHS' // Heat Seeking Rocket Launcher05A9: s$2450[2] = 'FLAMET' // Flamethrower05A9: s$2450[3] = 'MINIGU' // Minigun <------------ gxt to show weapon name0004: $9633[0] = 350004: $9633[1] = 360004: $9633[2] = 370004: $9633[3] = 38 // <--------------------------------- hardcoded weapon number0004: $9661 = 40002: jump @AMUNAT_12179///////////////////////-------------------modification------------------- You wanna add a weapon to the asault rifle menue? Sorry, but i'm too lazy to find out how to do. You wanna add a weapon to code block mod for the heavy weapon menue? Sorry, but i'm too lazy to explain, but it's really easy. It just needs to expand the code blocks as well as the last jump label of the first code block It is possible to realize this as in GTA UNDERGROUND? To have a connection with the shopping.dat lines. Example: minigun MINIGU 500 respect 0 sexy 0 10000 and section ammu# # - number item minigun Link to comment Share on other sites More sharing options...
ZAZ Posted August 9, 2017 Share Posted August 9, 2017 (edited) No, the code addon isn't affected by shopping.dat GTA UNDERGROUND? i haven't tested. Edited August 9, 2017 by ZAZ CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
B1ack_Wh1te Posted August 10, 2017 Author Share Posted August 10, 2017 They changed the original code of the Ammu Nation. Their weapons will be in the store if you add the line to the shopping.dat The name of the weapon. Link to comment Share on other sites More sharing options...
deltaCJ Posted August 10, 2017 Share Posted August 10, 2017 OH well, you're going to have to talk to dkluin or someone who works in underground... Link to comment Share on other sites More sharing options...
B1ack_Wh1te Posted August 11, 2017 Author Share Posted August 11, 2017 OH well, you're going to have to talk to dkluin or someone who works in underground... I thought so too, but unfortunately the dkluin ignored my requests for help. Link to comment Share on other sites More sharing options...
deltaCJ Posted August 11, 2017 Share Posted August 11, 2017 Try just modding vanilla instead of underground then. Link to comment Share on other sites More sharing options...
B1ack_Wh1te Posted August 11, 2017 Author Share Posted August 11, 2017 (edited) delete Edited March 30, 2018 by Dyabda Link to comment Share on other sites More sharing options...
Rac_rac Posted April 3, 2019 Share Posted April 3, 2019 Em 28/07/2017 às 22h35, Dyabda disse: Hi How to add a new weapon to Ammunition? For example: in the section of assault rifles add minigun. neste vídeo eu ensinei a fazer isso, ensinei a como colocar armas em qualquer cardápio da Amu NATION, eu coloquei uma arma adicionada sem substituir criando um novo cardápio para ela, e também coloquei a mesma arma no cardápio das pistolas!! tudo isso usando o script que está no pastebin que o ZAZ fez, aliás muito obrigado ZAZ por compartilhar esse seu external script 60 que você editou, por que foi graças a ele que eu consegui colocar armas adicionadas sem substituir para vender na Amu NATION. santosvagos 1 Link to comment Share on other sites More sharing options...
B1ack_Wh1te Posted April 6, 2019 Author Share Posted April 6, 2019 I have long understood how to do this and even rewrote the original script. Hovac 1 Link to comment Share on other sites More sharing options...
Rac_rac Posted April 6, 2019 Share Posted April 6, 2019 On 7/28/2017 at 10:35 PM, Dyabda said: maneiro, você também adiciona armas sem substituir ? Link to comment Share on other sites More sharing options...
B1ack_Wh1te Posted April 7, 2019 Author Share Posted April 7, 2019 (edited) On 4/7/2019 at 4:58 AM, Rac_rac said: maneiro, você também adiciona armas sem substituir ? Yes, for this I expand the array and change the jump table. For example, I will add molotov and teargas: 1) You need to rename the variable because you need to expand the array, and they are designed so that the array ($0, 5i) is $0, $1, $2, $3, $4. $0[4] = $4. 2) Need to add code for animation 3) Change the jump table. This is responsible for which category the weapon will be in. 4) Delete model If you want to add a new weapon that is not in the standard game, follow the same instructions and add a new constant, for example: WEAPON_INGRAM = 70 Edited September 7, 2020 by B1ack_Wh1te santosvagos 1 Link to comment Share on other sites More sharing options...
santosvagos Posted August 25, 2019 Share Posted August 25, 2019 After finishing adding custom weapon lines , Do I have to paste the whole things into main.scm or compile the script as .cs file ?? Link to comment Share on other sites More sharing options...
thalilmythos Posted August 25, 2019 Share Posted August 25, 2019 You know someone should port the ammunation code to cleo, creating another actor 2 meters from the default one, and leave the source around, could prove very usefull to avoid restarting the game. santosvagos 1 Link to comment Share on other sites More sharing options...
Strs Posted August 26, 2019 Share Posted August 26, 2019 ok what i see here is it looks good that yo ugo to buy weapon you need like in real life why dont you add some addons like when you finish or for xtra ammo you can buy it separate in little box like this From ammunation if you can add it it will be awesome feel in gta sa but make visible box of ammu pack that dealer gives like he do other weapons just idea if its possible PCjero 1 Link to comment Share on other sites More sharing options...
Mutfurry Posted September 6, 2020 Share Posted September 6, 2020 Already follow all instruction from this video. I buy new new weapon, but I don't get that weapon, no money decreased, and directly go to fist slot. And if I have same class weapon, the weapon is replaced, but I don't get new weapon. Link to comment Share on other sites More sharing options...
B1ack_Wh1te Posted September 6, 2020 Author Share Posted September 6, 2020 (edited) 14 hours ago, Mutfurry said: I buy new new weapon, but I don't get that weapon, no money decreased, and directly go to fist slot. And if I have same class weapon, the weapon is replaced, but I don't get new weapon Use the original ammunition source code. I have already described how to add new weapons with it. On 4/6/2019 at 2:02 PM, B1ack_Wh1te said: I have long understood how to do this and even rewrote the original script. On 4/7/2019 at 9:29 PM, B1ack_Wh1te said: For example, I will add molotov and teargas: 1) You need to rename the variable because you need to expand the array, and they are designed so that the array ($0, 5i) is $0, $1, $2, $3, $4. $0[4] = $4. 2) Need to add code for animation 3) Change the jump table. This is responsible for which category the weapon will be in. 4) Delete model If you want to add a new weapon that is not in the standard game, follow the same instructions and add a new constant, for example: WEAPON_INGRAM = 70 Edited September 7, 2020 by B1ack_Wh1te Link to comment Share on other sites More sharing options...
Mutfurry Posted September 6, 2020 Share Posted September 6, 2020 1 hour ago, B1ack_Wh1te said: Use the original ammunition source code. I have already described how to add new weapons with it. Those codings are different from me. So I must use your version instead that video? I try it. Link to comment Share on other sites More sharing options...
Mutfurry Posted September 6, 2020 Share Posted September 6, 2020 I mean I want to add new weapons like revolver. Link to comment Share on other sites More sharing options...
B1ack_Wh1te Posted September 7, 2020 Author Share Posted September 7, 2020 9 hours ago, Mutfurry said: So I must use your version instead that video? You should use whichever version is most convenient for you. My job is to help and offer you the option that I would take for myself. Link to comment Share on other sites More sharing options...
Mutfurry Posted September 7, 2020 Share Posted September 7, 2020 1 hour ago, B1ack_Wh1te said: You should use whichever version is most convenient for you. My job is to help and offer you the option that I would take for myself. I try to add Tear Gas and Molotov base on your tutorial. There are no those weapons in throwns list. Just grenade and Satchel Charge. Link to comment Share on other sites More sharing options...
B1ack_Wh1te Posted September 7, 2020 Author Share Posted September 7, 2020 Give me your main.scm, I'll see what the error is. Link to comment Share on other sites More sharing options...
Mutfurry Posted September 7, 2020 Share Posted September 7, 2020 (edited) https://pastebin.com/cpJKuBan https://pastebin.com/1d7D8Nem https://pastebin.com/KRMQaCVn With your script https://pastebin.com/YEzdACxb 1 hour ago, B1ack_Wh1te said: Give me your main.scm, I'll see what the error is. https://pastebin.com/cpJKuBan https://pastebin.com/1d7D8Nem https://pastebin.com/KRMQaCVn With your script https://pastebin.com/YEzdACxb 1 hour ago, B1ack_Wh1te said: Give me your main.scm, I'll see what the error is. Edited September 7, 2020 by Mutfurry 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