Master Mind Development
DiscordTebexGithub
  • ๐Ÿ’ฐPaid Release
    • ๐Ÿ“ฆAirdrop
      • โคต๏ธInstallation
        • ๐Ÿ‘œAdd Item
      • ๐Ÿ“’Configuration
        • ๐Ÿ’ชCore
        • ๐Ÿ‘œInventory
        • ๐Ÿ‘€Target
        • ๐ŸŽฎMinigame
      • ๐Ÿ‘จโ€๐Ÿ’ปCustomization
        • ๐Ÿ”ฅExplosive Crate
        • ๐Ÿ“งMail
    • ๐ŸŽ๏ธDealership
      • โคต๏ธInstallation
        • ๐Ÿ‘œAdd Item
        • ๐Ÿ‘จโ€๐Ÿ’ปInitializing/Configuration
        • ๐Ÿ“ธGenerate Vehicle Images
      • ๐Ÿ“’Configuration
        • ๐Ÿ’ชCore
        • ๐Ÿ‘œInventory
        • ๐Ÿ‘€Target
        • ๐Ÿ““Miscellaneous
      • ๐ŸฌHow to Add Custom Shop
      • โš ๏ธImportant Notes
  • ๐ŸŽFREE RELEASE
    • ๐Ÿ“ปRadio
      • โคต๏ธInsallation
        • ๐ŸŒ‰Bridge Setup
        • ๐Ÿ‘œAdd Item
        • ๐Ÿ‘จโ€๐Ÿ’ปHow to build svelte ui file?
      • ๐Ÿ“’Configuration
        • ๐Ÿ—ผJammer System
        • ๐Ÿ”‹Battery
        • ๐Ÿ“ปChannel Name
        • ๐Ÿ“ปRestricted Radio Channel
      • ๐Ÿ‘จโ€๐Ÿ’ปExports
      • ๐Ÿ’ปBranch
    • ๐Ÿ”‘Car Keys
      • โคต๏ธInstallation
        • ๐Ÿ‘œAdd Item
      • ๐Ÿ“’Configuration
        • ๐Ÿ’ชCore
        • ๐Ÿ‘œInventory
        • ๐Ÿ‘œStack Key
      • ๐Ÿ‘จโ€๐Ÿ’ปUseful Exports
Powered by GitBook
On this page
  • Add Export for QB Based Inventory
  • Generate Vehicle List
  • Add new Vehicles/Categories
  1. Paid Release
  2. Dealership
  3. Installation

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 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

// category template
return {
	name: string = "Category Label",
	category: string = "Category Name",
	shop: string = "shop id as in shops.lua",
	vehicles = {
		{ // vehicle template
			speed: number = "Speed of vehicle",
			nickname: string = "Nickname of vehicle",
			control: number = "Control of vehicle",
			stock: number = 1, // dont change this, set it to 1
			hash: string = "model name", 
			manufacturer: string = "Manufacturer Name",
			category: string = "Category Label",
			braking: number = "Braking of vehicle",
			shop: string = "shop id as in shops.lua",
			discountPrice: number = -1, // set to -1 if no discount
			dealerPrice: number = "Price of vehicle at vehicle import", 
			testDrivePrice: number = "Price of test drive, -1 to remove test drive",
			price: number = "Price of vehicle at shop",
			model: string = "Full name of Vehicle",
			acceleration: number = "Acceleration of vehicle",
		},
		{
			speed = 168,
			nickname = "",
			control = 84,
			stock = 1,
			hash = "jester2",
			manufacturer = "Dinka",
			category = "Sports",
			braking = 71,
			shop = "pdm",
			discountPrice = -1,
			dealerPrice = 156600,
			testDrivePrice = 1740,
			price = 174000,
			model = "Dinka Jester Racecar",
			acceleration = 31,
		},
	}
}

Last updated 1 year ago

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

๐Ÿ’ฐ
๐ŸŽ๏ธ
โคต๏ธ
๐Ÿ‘จโ€๐Ÿ’ป
here