[RELEASE][ESX] Items for weapons and accessories

Thanks you, that is working now but is there a way that i can give my ammo to another person?

for everything to work well erase the weapons generated with / giveweapon and you have to give yourself the ammunition and the weapon with / giveitem. If everything has worked well in your inventory you have 2 items, the weapon and the bullets, which you can give to other users

I did spawned everything as a item but i can’t drag they ammunition to give?

I guess it has something to do with your inventory system

Hi, glad to see that you enjoy the script but as @Mgil10 wrote it must be something with the inventory you’ll use because weapon and ammunition is used as ordinary items in ESX and shall be giveable as any other item. What inventory system are you using?

Yeah that could be it, i’m using this inventory: [Release][ESX] Inventory HUD - 2.4 (properties, trunks, players, shops, storages ...) I appreciate the help!

But a tips I got check the items in the database as well so they are inserted correctly, also can you drop the ammo?

Yes, you were right…
A stupid mistake in my database, thanks for the help & for the script!

No problem, I’m just glad it all got sorted out :slight_smile:

Looks nice! Anybody got this running with [ESX] CONDE-B1G_INVENTORY | Fast Items, Hotbar, Notifications, Shortcuts, HUD and much more? Guess it would require quite a bit of modification to bypass that disc-ammo thingie… nonetheless looks good!

Thank you, but what do you mean with disc-ammo thingie? Because i’ve never used the inventory that you’ve sent a link to.

Well it equips weapons if the weapon item is used (pull your gun) and removes them if the item is used again (putting your gun away). Ammo count is saved in db. I have tried it by now and the result was the expected one… if you have your gun out adding or dropping ammo (item) with your script will change ammo count (because you have the weapon in that moment).
But if if you dont have your gun out adding or removing ammo will do nothing because the next time you pull your gun the db ammo count is loaded and the ammo amount (item) in the inventory is set to the db value. This way you can drop all your ammo with the gun stashed → pull your weapon → ammo in inventory (item) is restored to db value → collect your dropped ammo and dupe your ammo.

Okey, well the use funktion on weapons is a easy code worl making it usable, but the ammo problem is needed to be changed in the code of the disc-ammo

1 Like

Yeah, i guess i’ll look for the the built in disc-ammo code in the inventoryhud and disable disc-ammo.

Did you manage to get it to work? would be fun to know :slight_smile:

I got an issue after server restart ammo are remove. Anyone can help me please.

How are you givning the weapons? Giveweapon or giveitem?

giveitem

Okay, but does anything else disappear from your inventory or is it only the ammo item?

Yes, Only ammo