Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

Dyabda

Ammu - Nation

Recommended Posts

Dyabda

Hi

How to add a new weapon to Ammunition?
For example: in the section of assault rifles add minigun.

 

Share this post


Link to post
Share on other sites
deltaCJ

You'd have to add the option in the main.scm external script.

Share this post


Link to post
Share on other sites
Dyabda

You'd have to add the option in the main.scm external script.

Which parameter should be added to main.scm?

Share this post


Link to post
Share on other sites
kosticn101

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

Share this post


Link to post
Share on other sites
Dyabda

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
Dyabda

Unfortunately, ZAZ does not answer.

Share this post


Link to post
Share on other sites
ZAZ

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

Share this post


Link to post
Share on other sites
Dyabda

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

Share this post


Link to post
Share on other sites
ZAZ

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

GTA UNDERGROUND? i haven't tested.

Edited by ZAZ

Share this post


Link to post
Share on other sites
Dyabda
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.

Share this post


Link to post
Share on other sites
deltaCJ

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

Share this post


Link to post
Share on other sites
Dyabda

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.

Share this post


Link to post
Share on other sites
deltaCJ

Try just modding vanilla instead of underground then.

Share this post


Link to post
Share on other sites
Dyabda

delete

Edited by Dyabda

Share this post


Link to post
Share on other sites
Rac_rac
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.

Share this post


Link to post
Share on other sites
Rac_rac
On 7/28/2017 at 10:35 PM, Dyabda said:

 

maneiro, você também adiciona armas sem substituir ?

Share this post


Link to post
Share on other sites
Dyabda
16 hours ago, 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
2) Change the jump table. This is responsible for which category the weapon will be in.
 

2796cbf5d2d0.png
9e71ad21db2c.png
d777db175fcd.png
785757926602.png
3) 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

Share this post


Link to post
Share on other sites
santosvagos

After finishing adding custom weapon lines , Do I have to paste the whole things into main.scm or compile the script as .cs file ??

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
Strs

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 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 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.