Setup

ox_inventory -> client.lua

Step 1 - Add Button Functions

find this

---@param id number
---@param slot number
local function useButton(id, slot)
	if PlayerData.loaded and not invBusy and not lib.progressActive() then
		local item = PlayerData.inventory[slot]
		if not item then return end

		local data = Items[item.name]
		local buttons = data?.buttons

		if buttons and buttons[id]?.action then
			buttons[id].action(slot)
		end
	end
end

replace to this

---@param id number
---@param slot number
local function useButton(id, slot)
	if PlayerData.loaded and not invBusy and not lib.progressActive() then
		local item = PlayerData.inventory[slot]
		if not item then return end

		local data = exports.fmid_split:GetItemData(PlayerData.inventory, slot)
		local buttons = data?.buttons

		if buttons and buttons[id]?.action then
			buttons[id].action(slot)
		end
	end
end

Step 2 - Apply Split Button to all items

find this event

and this keyword inside that eventname,

above that words, you can put this

Step 3 - Save Data of All Overwritten Items

find this

above of that, you can add this

Last Setup, Adjust your server.cfg

put fmid_split resource above of ox_inventory at server.cfg's list,

example

Setup Done! you can enjoy the script.

for full setup video (indonesian), you can watch here

Last updated