Migration
If you are replacing an existing inventory system (specifically OX Inventory or Quasar (qs) Inventory), ak47_inventory includes powerful built-in migration tools to seamlessly transfer your server's data.
Player Data Migration (Automatic)
When you first start ak47_inventory, the server/_init.lua script will attempt to detect if you are running an existing ox_inventory, esx, or qbcore inventory database structure.
OX Inventory: It will automatically read the
ox_inventorydatabase tables and migrate players, vehicles, and stashes into theak47_inventoryformat.ESX/QBCore Native: It will decode the
users(orplayers) table's JSON inventory data and reconstruct it securely insideak47_inventory.
[!WARNING] After the automatic database migration completes, you will see a message instructing you to restart your server. You must restart the server to finalize the data loading.
Item & Config Migration (convert/converter.lua)
convert/converter.lua)If you have heavily customized items and weapons in OX or Quasar, you do not need to manually rewrite them into ak47_inventory format. The convert/ folder handles this.
Locate the
convert/ox/orconvert/qs/folders.Place your existing
items.luaorweapons.luafrom your old inventory into the corresponding folder.Start the
ak47_inventoryscript.The system will detect the old item lists and execute
convert/converter.lua.Your old items, weights, and durability logic will be automatically rewritten into
ak47_inventoryformat and saved into theshared/directory.
[!TIP] Just like with the database migration, if the converter successfully converts items, you will see a console prompt telling you to restart the inventory to load the new converted items.
Last updated