Full View config.lua

Preview File Updated: v1.0.0 - 28.01.2024

Config = {}

-- █▀ █▀▄ ▄▀▄ █▄ ▄█ ██▀ █   █ ▄▀▄ █▀▄ █▄▀
-- █▀ █▀▄ █▀█ █ ▀ █ █▄▄ ▀▄▀▄▀ ▀▄▀ █▀▄ █ █

Config.Core = "ESX" -- "ESX" / "QB-Core"
Config.CoreExport = function()
    if Config.Core == "ESX" then
        return exports['es_extended']:getSharedObject()
    else
        return exports['qb-core']:GetCoreObject()
    end
end

-- @PlayerLoaded - ESX: "esx:playerLoaded" / QB-Core: "QBCore:Client:OnPlayerLoaded"
Config.PlayerLoaded = "esx:playerLoaded"

-- @PlayerLogoutServer: ESX: "esx:playerDropped" / QB-Core: "QBCore:Server:OnPlayerUnload"
Config.PlayerLogoutServer = "esx:playerDropped"

-- @PlayerSetJob - ESX: "esx:setJob" / QB-Core: "QBCore:Client:OnJobUpdate"
Config.PlayerSetJob = "esx:setJob"


Config.Notification = function(message, time, type)
    if type == "success" then
        if GetResourceState("vms_notify") == 'started' then
            exports['vms_notify']:Notification("VEHICLE SHOP", message, time, "#36f230", "fa-solid fa-shop")
        else
            TriggerEvent('esx:showNotification', message)
            TriggerEvent('QBCore:Notify', message, 'success', time)
        end
    elseif type == "error" then
        if GetResourceState("vms_notify") == 'started' then
            exports['vms_notify']:Notification("VEHICLE SHOP", message, time, "#f23030", "fa-solid fa-shop")
        else
            TriggerEvent('esx:showNotification', message)
            TriggerEvent('QBCore:Notify', message, 'error', time)
        end
    elseif type == "info" then
        if GetResourceState("vms_notify") == 'started' then
            exports['vms_notify']:Notification("VEHICLE SHOP", message, time, "#4287f5", "fa-solid fa-shop")
        else
            TriggerEvent('esx:showNotification', message)
            TriggerEvent('QBCore:Notify', message, 'primary', time)
        end
    end
end

Config.Interact = {
    Enabled = false,
    Open = function(message)
        exports["interact"]:Open("E", message) -- Here you can use your TextUI or use my free one - https://github.com/vames-dev/interact
    end,
    Close = function()
        exports["interact"]:Close() -- Here you can use your TextUI or use my free one - https://github.com/vames-dev/interact
    end
}

Config.Hud = {
    Enable = function()
        if GetResourceState('vms_hud') ~= 'missing' then
            exports['vms_hud']:Display(true)
        end
    end,
    Disable = function()
        if GetResourceState('vms_hud') ~= 'missing' then
            exports['vms_hud']:Display(false)
        end
    end
}

-- @UseTarget: Do you want to use target system
Config.UseTarget = false
Config.TargetResource = 'ox_target' -- Prepared for 'ox_target', 'qb-target' (config.client.lua - CL.Target)

Config.UseMarkers = true -- Using a marker to display points
Config.UseText3D = false -- Using a 3D Text to display points
Config.UseHelpNotify = true -- Using a ESX.ShowHelpNotification (only for esx)

-- @AutoExecuteQuery: Automatic execution of the creation of the vms_business table in database
Config.AutoExecuteQuery = true

-- @DebugPolyZone: Option only for developers to recognize the registration of polyzone store object, and facilitate the creation of new
Config.DebugPolyZone = false

-- @PlateFormat: Set up your license plate generation format, set any way you want, when you set a letter, it will generate a random letter, when you set a number, it will generate a random number, below are sample formats.
-- 'ABC 1234' / '1234 ABC' / 'ABCD1234'
Config.PlateFormat = 'ABC 1234'

-- @UsePhotosTool: Photos tool on greenscreen, used prop: 'prop_big_cin_screen' whose creator is nnuu
Config.UsePhotosTool = false
Config.PhotosToolCommand = 'photostool'

-- @UnitOfSpeed: Speed unit for showroom display and maximum speed calculation
Config.UnitOfSpeed = 'kmh' -- 'kmh' or 'mph'

-- @TestDriveOnRoutingBucket: Is the test drive to take place in a dedicated virtual world, players will not see or hear each other
Config.TestDriveOnRoutingBucket = false


Config.Marker = {
    ['delivery'] = {
        distanceSee = 20.0,
        distanceAccess = 1.8,
        type = 20,
        color = {50, 50, 225, 175},
        rotation = vec(0.0, 0.0, 0.0),
        scale = vec(0.7, 0.7, 0.7),
        bobUpAndDown = false,
        rotate = true,
    },
    ['contract'] = {
        distanceSee = 7.75,
        distanceAccess = 2.8,
        type = 29,
        color = {142, 255, 77, 225},
        rotation = vec(0.0, 0.0, 0.0),
        scale = vec(0.28, 0.28, 0.28),
        bobUpAndDown = true,
        rotate = true,
    },
    ['showroom'] = {
        distanceSee = 2.75,
        distanceAccess = 1.0,
        type = 20,
        color = {142, 255, 77, 180},
        rotation = vec(0.0, 180.0, 0.0),
        scale = vec(0.15, 0.15, 0.15),
        bobUpAndDown = false,
        rotate = true,
    },
    ['management'] = {
        distanceSee = 2.75,
        distanceAccess = 1.0,
        type = 20,
        color = {252, 198, 3, 180},
        rotation = vec(0.0, 180.0, 0.0),
        scale = vec(0.15, 0.15, 0.15),
        bobUpAndDown = false,
        rotate = true,
    },
}

Config.Blips = {
    ['delivery'] = {
        sprite = 271,
        display = 4,
        scale = 1.0,
        color = 38,
        routeColor = 38,
        name = "Delivery"
    },
    ['order'] = {
        sprite = 479,
        display = 6,
        scale = 1.2,
        color = 28,
        routeColor = 28,
        name = "Order"
    },
}

Config.Stores = {
    ["PDM"] = {
        jobName = 'pdm',
        
        brand = "Premium Deluxe Motorsports",
        address = "Power St. Adam Apple Blvd, Pillbox Hill",

        paymentMethods = {'cash', 'bank'},

        wholesaleType = 'cars',
        maxOrderVehicles = 4, -- Maximum number of vehicles that can be ordered per order, due to the limit of space on the trailer for realistic delivery

        realisticDelivery = true, -- Does the player have to drive himself to pick up the vehicles
        orderDeliveryTime = 12 * 60, -- Value given in minutes, only works with realisticDelivery = false

        allowPurchase = true, -- Should there be an option to purchase the vehicle in the showroom?
        allowTestDrive = true, -- Should there be an option to test drive the vehicle in the showroom?
        showPrices = true, -- Should the vehicle price be visible in the showroom?
        abilityCustomLicensePlate = true, -- Should there be an option to set a custom license plate in the showroom/management?
        showOnlyAvailable = false, -- Should only vehicles available in stock be visible in the showroom?

        spawnVehicleOnPurchase = false, -- Vehicle is supposed to spawn after purchase

        testDriveTime = 30, -- seconds
        testDrivePrice = 1000,

        freeCamRadius = 5.5,
        
        storeArea = { -- PolyZone
            vector2(-72.46, -1125.31),
            vector2(-16.36, -1123.88),
            vector2(-0.69, -1081.1),
            vector2(-19.94, -1074.09),
            vector2(-21.06, -1077.19),
            vector2(-56.38, -1064.47),
            vector2(-77.08, -1120.19),
        },
        minZ = 25.4,
        maxZ = 39.23,

        blip = {
            enabled = true,
            coords = vector3(-42.89, -1098.93, 25.42),
            sprite = 820,
            display = 4,
            scale = 1.0,
            color = 26,
            name = 'Vehicle Shop',
        },

        vehiclePoint = vector4(-47.22, -1074.92, 25.7, 71.74),
        deliveryPoint = vector3(-45.78, -1080.87, 26.69),
        
        onPurchasePoint = vector4(-47.22, -1074.92, 25.7, 71.74),

        testDrivePoint = vector4(-28.76, -1081.46, 25.64, 70.74),
        testDriveEndPoint = vector3(-45.78, -1080.87, 26.69),

        showroomPoint = {
            coords = vector3(-57.35, -1097.0, 26.42),
            targetCoords = vector3(-56.8, -1097.91, 25.82),
            targetHeading = 210.0,
            targetSize = vec(3.5, 1.0, 1.8),
        },

        showroomInside = {
            camera = vector3(-48.66, -1100.71, 26.73),
            cameraFov = 65.5,
            vehicle = vector4(-44.47, -1097.25, 25.42, 92.34),
            player = vector4(-44.19, -1098.78, 25.42, 108.79),
        },

        managementPoint = {
            coords = vector3(-31.83, -1114.08, 26.42),
            targetCoords = vector3(-33.05, -1114.43, 25.8),
            targetHeading = 70.0,
            targetSize = vec(2.4, 1.35, 1.85),
        },

        vehicles = {
            ['blade'] = true,
            ['buccaneer'] = true,
            -- [...] = true,
        },
    },
    ["PlanesDealership"] = {
        jobName = 'planesdealership',
    
        brand = "Planes Dealership",
        address = "Los Santos International Airport",

        paymentMethods = {'cash', 'bank'},

        wholesaleType = 'planes',
        maxOrderVehicles = 1,

        realisticDelivery = false, -- Does the player have to drive himself to pick up the vehicles
        orderDeliveryTime = 24 * 60, -- Value given in minutes, only works with realisticDelivery = false

        allowPurchase = true,
        allowTestDrive = true,
        showPrices = true,
        abilityCustomLicensePlate = false,
        showOnlyAvailable = false,

        spawnVehicleOnPurchase = true, -- Vehicle is supposed to spawn after purchase

        testDriveTime = 120, -- seconds
        testDrivePrice = 6000,
        
        freeCamRadius = 15.5,

        storeArea = { -- PolyZone
            vector2(-1034.1, -2871.65),
            vector2(-1064.45, -2926.7),
            vector2(-1119.66, -2894.29),
            vector2(-1092.95, -2848.45),
        },
        minZ = 11.5,
        maxZ = 26.13,

        blip = {
            enabled = true,
            coords = vector3(-1070.72, -2868.32, 12.95),
            sprite = 582,
            display = 4,
            scale = 1.0,
            color = 26,
            name = 'Planes Dealership',
        },
        
        vehiclePoint = vector4(-1081.76, -2889.77, 13.95, 258.12),
        deliveryPoint = vector3(-1074.24, -2923.03, 13.95),
        
        onPurchasePoint = vector4(-985.24, -3114.29, 13.94, 114.29),

        testDrivePoint = vector4(-1330.37, -2200.23, 12.98, 149.59),
        testDriveEndPoint = vector3(-1074.24, -2923.03, 13.95),

        showroomPoint = {
            coords = vector3(-1070.68, -2868.34, 13.95),
            targetCoords = vector3(-1070.13, -2867.22, 14.4),
            targetHeading = 333.14,
            targetSize = vec(2.4, 1.45, 2.5),
        },
        
        showroomInside = {
            camera = vector3(-1336.159, -2739.14, 15.864),
            cameraFov = 59.5,
            vehicle = vector4(-1343.11, -2725.5, 12.94, 149.03),
            player = vector4(-1336.02, -2730.53, 12.94, 181.71),
        },

        managementPoint = {
            coords = vector3(-1078.27, -2863.67, 13.95),
            targetCoords = vector3(-1078.27, -2863.67, 13.95),
            targetHeading = 328.14,
            targetSize = vec(3.0, 3.0, 3.0),
        },

        vehicles = {
            ['alphaz1'] = true,
            ['cuban800'] = true,
            -- [...] = true,
        },
    },
    ["BoatsDealership"] = {
        jobName = 'boatsdealership',
        
        brand = "Boats Dealership",
        address = "Los Santos International Airport",

        paymentMethods = {'cash', 'bank'},

        wholesaleType = 'boats',
        maxOrderVehicles = 1,

        realisticDelivery = false, -- Does the player have to drive himself to pick up the vehicles
        orderDeliveryTime = 6 * 60, -- Value given in minutes, only works with realisticDelivery = false

        allowPurchase = true,
        allowTestDrive = true,
        showPrices = true,
        abilityCustomLicensePlate = false,
        showOnlyAvailable = false,

        spawnVehicleOnPurchase = true, -- Vehicle is supposed to spawn after purchase

        testDriveTime = 90, -- seconds
        testDrivePrice = 6000,
        
        freeCamRadius = 14.5,

        storeArea = { -- PolyZone
            vector2(-676.39, -1391.83),
            vector2(-701.69, -1422.17),
            vector2(-732.94, -1396.99),
            vector2(-709.01, -1363.78),
        },
        minZ = 4.0,
        maxZ = 15.0,

        blip = {
            enabled = true,
            coords = vector3(-699.26, -1395.1, 12.9),
            sprite = 427,
            display = 4,
            scale = 1.0,
            color = 26,
            name = 'Boat Dealership',
        },

        vehiclePoint = vector4(-682.46, -1424.32, 4.0, 85.13),
        deliveryPoint = vector3(-693.2, -1403.65, 5.0),

        onPurchasePoint = vector4(-889.08, -1442.13, -1.47, 293.07),
        
        testDrivePoint = vector4(-830.78, -1529.63, -0.37, 137.91),
        testDriveEndPoint = vec(-846.15, -1503.58, 1.0),

        showroomPoint = {
            coords = vector3(-696.5, -1386.62, 5.5),
            targetCoords = vector3(-696.21, -1386.82, 5.5),
            targetHeading = 231.06,
            targetSize = vec(1.8, 1.0, 2.5),
        },

        showroomInside = {
            camera = vector3(-837.47, -1492.268, 2.842),
            cameraFov = 52.0,
            vehicle = vector4(-846.15, -1503.58, -0.3, 293.78),
            player = vector4(-845.91, -1497.69, 0.63, 316.89),
        },

        managementPoint = {
            coords = vector3(-704.28, -1398.45, 5.5),
            targetCoords = vector3(-703.87, -1398.06, 5.0),
            targetHeading = 321.28,
            targetSize = vec(1.8, 1.0, 2.5),
        },
        
        vehicles = {
            ['avisa'] = true,
            ['dinghy'] = true,
            -- [...] = true,
        },
    },
}

Last updated