[Solved] Amount Ammo Check - Reload Gun

Started by Cloud140 on

Topic category: Help with modding (Java Edition)

Last seen on 13:36, 14. Apr 2022
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Solved] Amount Ammo Check - Reload Gun
Sun, 03/27/2022 - 15:18 (edited)

Hi.
I have problem with checking how much player has ammo in inventory and loading certain ammo to the gun.
I made this but if player has one ammo item in inventory he reloading max ammo.
Reload Procedure

When i wanted add Tag to ammo and make with NBT tag, checking Ammo NBT tag, its was failure.

Here we have shoting procedrue if will need it:
Shooting Procedure

 

I need checking how much have player ammo in inventory. For example, if max ammo has 7 slots, i have 5 bullets in inventory, after reloading i will be have 5/7 available shots.
In pistol its not very bad but i made 30 bullets rifle and now i have problem.
How edit this reload procedure?

Edited by Cloud140 on Sun, 03/27/2022 - 15:18
Last seen on 13:36, 14. Apr 2022
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I solved myself. Subject to…
Sun, 03/27/2022 - 15:17

I solved myself.
Subject to close

Here you have solved procedure:

Solved

Last seen on 10:27, 19. May 2024
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can you show me "…
Mon, 04/11/2022 - 12:12

Can you show me " PistolAmmoSndVersionReloadOnKeyPressed" proceduce?