πŸ‘¨β€πŸ’»Initializing/Configuration

A guide on how to generate vehicle list

Add Export for QB Based Inventory

Create a export if not exist in qb-inventory/server.lua

-- Stash Items
local function GetStashItems(stashId)
	local items = {}
	local result = MySQL.scalar.await('SELECT items FROM stashitems WHERE stash = ?', {stashId})
	if not result then return items end

	local stashItems = json.decode(result)
	if not stashItems then return items end

	for _, item in pairs(stashItems) do
		local itemInfo = QBCore.Shared.Items[item.name:lower()]
		if itemInfo then
			items[item.slot] = {
				name = itemInfo["name"],
				amount = tonumber(item.amount),
				info = item.info or "",
				label = itemInfo["label"],
				description = itemInfo["description"] or "",
				weight = itemInfo["weight"],
				type = itemInfo["type"],
				unique = itemInfo["unique"],
				useable = itemInfo["useable"],
				image = itemInfo["image"],
				slot = item.slot,
			}
		end
	end
	return items
end

exports('GetStashItems', GetStashItems)

Generate Vehicle List

Step 1: Start the scripts as in order provided here and join the server

Step 2: On F8 console/chat try executing this command generatevehlist and wait for the script to retrive all vehicle data from core.

Step 3: Upon Completion you will see files/folders introducing in mm_dealership/data/ folder

Add new Vehicles/Categories

Last updated