Setup
ox_inventory -> client.lua
Step 1 - Add Button Functions
---@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---@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
endStep 2 - Apply Split Button to all items
Step 3 - Save Data of All Overwritten Items
Last Setup, Adjust your server.cfg
Setup Done! you can enjoy the script.
Last updated