ox_inventory > modules > items > server.lua
paste this towards the bottom
if event == 'usedItem' then
Inventory.AddItem(inventory, 'ammo-9', 120)
end
end)
Item('box_ammo_45', function(event, item, inventory, data, slot)
if event == 'usedItem' then
Inventory.AddItem(inventory, 'ammo-45', 120)
end
end)
Item('box_ammo_50', function(event, item, inventory, data, slot)
if event == 'usedItem' then
Inventory.AddItem(inventory, 'ammo-50', 120)
end
end)
Item('box_ammo_rifle', function(event, item, inventory, data, slot)
if event == 'usedItem' then
Inventory.AddItem(inventory, 'ammo-rifle', 60)
end
end)
Item('box_ammo_rifle2', function(event, item, inventory, data, slot)
if event == 'usedItem' then
Inventory.AddItem(inventory, 'ammo-rifle2', 60)
end
end)
Item('box_ammo_shotgun', function(event, item, inventory, data, slot)
if event == 'usedItem' then
Inventory.AddItem(inventory, 'ammo-shotgun', 10)
end
end)
Item('box_ammo_sniper', function(event, item, inventory, data, slot)
if event == 'usedItem' then
Inventory.AddItem(inventory, 'ammo-sniper', 10)
end
end)
credit to 1wxndr on cfx for posting a snippet showing that this is built into ox_inventory extras.
paste items below in ox_inventory > items.lua