This script replaces the weapon system in ESX, Instead it stores all of the weapons and ammunitions as items in the inventory which simplifies adding weight and carrying multiple at once.
item and ammoIteam can be whatever you name the items in your database on the server.
Changelog:
Version 1.1 - 2021-04-13
1.Support added for throwable weapons into the scripts.
2.Added weapons in the config file.
3.Updated Readme.
Version 1.2 - 2021-04-14
1. Fixed issues with the ammunition synchronisation.
Version 1.3 - 2021-04-22
1. Fixed issues with an weapon ammo cap issue.
Version 1.4 - 2021-11-25
1. Setting for making weapon item usable added.
Yes, I’ll plan to add all weapons in the future and also add the components.
To be honest most of the parts in any lua script that have anything like this is vulnerable against lua executors and two of the parts you posted is only calling an event when an event is triggered in es_extended.
Or do you mostly mean I use the xPlayer.setInventoryItem function?
Is the issue that you’ll get the message 5 times or is it that the message appears? There are instructions in the readme to make the messages disappear.
Hello, it kinda saves the ammo for specific weapon for example if i get 50round of Rifle Ammo and draw my Carbine Rifle it saves them to Carbine. When i draw my Assault Rifle it removes the past 50round of Carbine and i need to take new rounds for AssaultRifle.
Can’t we just say something like, how much ammo you have, okay if it fits to Carbine or Assault it doesnt matter which one you using?
Can you set the ammoboxes with an amount? Because when i buy a ammo box e.G: ammo_pistol then its only 1 bullet. I think its better to set it higher e.G 1 ammo box is worth 40 bullets.