ESX
1) Please navigate to the file player.lua located in the directory es_extended/server/classes/. In this file, you will find a function named self.hasWeapon. You are to replace the entire content of this function, from the beginning to the end, with the new code provided.
Explanation:
This code is designed to prevent the loss of ammunition by restricting the use of more than one weapon of the same type. This implies that you will only be able to use one weapon per category, unless you dismantle the weapon in your inventory.
2) Next, please navigate to the main.lua file located in the es_extended/client/ directory. At the end of this file, append the provided code.
Explanation:
This code is specifically engineered to store the updated ammunition count of your weapon within the metadata of your framework.
Last updated