[FREE] Fosty AmmoBox [ESX,QB/Ox Inventory]

:ok_hand: Nice

cool work. hopefully for future update you’ll include progress bar and animations

hey brother mi_oxitems github is down, did u have a backup?

it was a old version how can i uptade this?

Hey can you put here your inventory pls I want the inventory but I don’t find it

This worked for me, I added it to the server like this and now it works for me:

Item(‘ammo-9-box’, function(event, item, inventory, data, slot)
if event == ‘usedItem’ then
if Inventory.AddItem(inventory, ‘ammo-9’, 16) > 0 then
end
end
end)

Because when I put it as you indicate, I get an error in the inventory.

this don’t work when i try drag ammo after spawn it in it say i can’t do this can you help me or got a discord

Hi I just entered the code and


2024-12-31 21-11-30.mkv (21.0 MB)

I still can’t put in boxes of ammunition, please help me

You have a mistake in it, do it like I did and it will work

Item('ammobox-9', function(event, item, inventory, slot, data)
    if event == 'usedItem' then
        Inventory.AddItem(source, 'ammo-9', 30)
    end
end)
Here are all the ones I have in there
Item('ammobox-9', function(event, item, inventory, slot, data)
    if event == 'usedItem' then
        Inventory.AddItem(source, 'ammo-9', 30)
    end
end)

Item('ammobox-45', function(event, item, inventory, slot, data)
    if event == 'usedItem' then
        Inventory.AddItem(source, 'ammo-45', 30)
    end
end)

Item('ammobox-rifle', function(event, item, inventory, slot, data)
    if event == 'usedItem' then
        Inventory.AddItem(source, 'ammo-rifle', 25)
    end
end)

Item('ammobox-44', function(event, item, inventory, slot, data)
    if event == 'usedItem' then
        Inventory.AddItem(source, 'ammo-44', 30)
    end
end)

Item('ammobox-38', function(event, item, inventory, slot, data)
    if event == 'usedItem' then
        Inventory.AddItem(source, 'ammo-38', 30)
    end
end)

Item('ammobox-rifle2', function(event, item, inventory, slot, data)
    if event == 'usedItem' then
        Inventory.AddItem(source, 'ammo-rifle2', 25)
    end
end)

Item('ammobox-shotgun', function(event, item, inventory, slot, data)
    if event == 'usedItem' then
        Inventory.AddItem(source, 'ammo-shotgun', 30)
    end
end)

Item('ammobox-22', function(event, item, inventory, slot, data)
    if event == 'usedItem' then
        Inventory.AddItem(source, 'ammo-22', 30)
    end
end)

Item('ammobox-38', function(event, item, inventory, slot, data)
    if event == 'usedItem' then
        Inventory.AddItem(source, 'ammo-38', 30)
    end
end)

Item('ammobox-50', function(event, item, inventory, slot, data)
    if event == 'usedItem' then
        Inventory.AddItem(source, 'ammo-50', 30)
    end
end)

Item('ammobox-firework', function(event, item, inventory, slot, data)
    if event == 'usedItem' then
        Inventory.AddItem(source, 'ammo-firework', 10)
    end
end)

Item('ammobox-flare', function(event, item, inventory, slot, data)
    if event == 'usedItem' then
        Inventory.AddItem(source, 'ammo-flare', 5)
    end
end)

Item('ammobox-grenade', function(event, item, inventory, slot, data)
    if event == 'usedItem' then
        Inventory.AddItem(source, 'ammo-grenade', 5)
    end
end)

Item('ammobox-heavysniper', function(event, item, inventory, slot, data)
    if event == 'usedItem' then
        Inventory.AddItem(source, 'ammo-heavysniper', 10)
    end
end)

Item('ammobox-smg', function(event, item, inventory, slot, data)
    if event == 'usedItem' then
        Inventory.AddItem(source, 'ammo-smg', 30)
    end
end)

Item('ammobox-sniper', function(event, item, inventory, slot, data)
    if event == 'usedItem' then
        Inventory.AddItem(source, 'ammo-sniper', 25)
    end
end)

Item('ammobox-bb', function(event, item, inventory, slot, data)
    if event == 'usedItem' then
        Inventory.AddItem(source, 'ammo-bb', 25)
    end
end)

Item('ammobox-pistol', function(event, item, inventory, slot, data)
    if event == 'usedItem' then
        Inventory.AddItem(source, 'ammo-pistol', 30)
    end
end)

Item('ammobox-shotgun-bean', function(event, item, inventory, slot, data)
    if event == 'usedItem' then
        Inventory.AddItem(source, 'ammo-shotgun-bean', 30)
    end
end)

I just compared the 2 codes, there is no error

It’s just a small difference but it makes a big difference

your inventory is there
Inventory.AddItem(inventory, 'ammo-9', 120)

For me it says source, that’s the difference
Inventory.AddItem(source, 'ammo-9', 30)

so i thought this was compatible with qbcore but there are no qbcore functions in this when I download

i dont know why but this doesnt work for me, thats why i was looking for a ammobox script, even tho im using the release version of ox_inventory, when i tried to make this type of item manually it doesnt work

GitHub - HazeWorksOnFiveMServer/mi_utils: Utility script for M.I. Resources You need Mi Utils

how can we make it work with qbox

Hello everyone! :raised_hand_with_fingers_splayed:

Some members of our development team have been using this amazing resource in their projects but felt like something was missing. So, we decided to collaborate, improve it, and now we’re excited to share our remade version, completely open source and free to use:

:link: Check it out on GitHub
Resource is now compatible with QB-Core and QBox while mantaining the ESX compatibility

All credit goes to fosty for creating the original resource—thank you for your incredible work!

Please note: our collective will not provide general support. Before opening an issue, make sure to check the TROUBLESHOOTING.md file included in the repository. If your problem isn’t listed there, feel free to open an issue on GitHub.

God bless, and happy coding! :sparkles: