Jump to content

Ammu - Nation


B1ack_Wh1te

Recommended Posts

B1ack_Wh1te

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

B1ack_Wh1te

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

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

Edited by kosticn101
Link to comment
Share on other sites

B1ack_Wh1te

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 by Dyabda
Link to comment
Share on other sites

crashoverride93

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

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

  • Like 1
Link to comment
Share on other sites

B1ack_Wh1te

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

No, the code addon isn't affected by shopping.dat

GTA UNDERGROUND? i haven't tested.

Edited by ZAZ
Link to comment
Share on other sites

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

OH well, you're going to have to talk to dkluin or someone who works in underground...

Link to comment
Share on other sites

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

  • 1 year later...
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.

  • Like 1
Link to comment
Share on other sites

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

B1ack_Wh1te
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.
a47e8ea8b53a.png
97ebadfff1b4.png
2) Need to add code for animation
9afda0bc0d82.png
bc3a2e325565.png
3a5fe0a8393f.png
acee06ce7439.png
3) Change the jump table. This is responsible for which category the weapon will be in.
 

2796cbf5d2d0.png
9e71ad21db2c.png
d777db175fcd.png
785757926602.png
4) Delete model
7cfeb054ef12.png
f985610d7c21.png

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 by B1ack_Wh1te
  • Like 1
Link to comment
Share on other sites

  • 4 months later...

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

thalilmythos

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.

  • Like 1
Link to comment
Share on other sites

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 07bcb0e33472c72737174aaa92adfc62c7e77649 

 

704010_ts.jpg

images?q=tbn:ANd9GcRm-qsd_Y9MYDuVIu_RiWD

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 

Link to comment
Share on other sites

  • 1 year later...

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

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.
a47e8ea8b53a.png
97ebadfff1b4.png
2) Need to add code for animation
9afda0bc0d82.png
bc3a2e325565.png
3a5fe0a8393f.png
acee06ce7439.png
3) Change the jump table. This is responsible for which category the weapon will be in.
 

2796cbf5d2d0.png
9e71ad21db2c.png
d777db175fcd.png
785757926602.png
4) Delete model
7cfeb054ef12.png
f985610d7c21.png

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 by B1ack_Wh1te
Link to comment
Share on other sites

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

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

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

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/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 by Mutfurry
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.