So I’ve been trying to figure out how to get the ammo feature in ESX extra items to work. I was originally using the DISC Inventory HUD system, which had ammo built in, however I switched back to esx_inventoryhud as it seems to integrate with things a bit better. That being said, I’m trying to use the ammo option built into esx_extraitems and can’t seem to get it to work. I’m using the basic ammo, so no weapon specific ammo. When I try to drag the ammo box to use with the weapon equipped it does nothing and puts the following message in the console:
SCRIPT ERROR: @esx_extraitems/server/main.lua:313: attempt to call a nil value (field 'GetWeaponFromHash')
I’ve glanced at the spot in the file it references but don’t really see what the issue would be. Fairly new to coding and using FiveM server dev to learn for the most part. Any ideas here?