Full View config.lua

Preview File Updated: v1.0.5 - 12.09.2024

Config = {}

------ █▀ █▀▄ ▄▀▄ █▄ ▄█ ██▀ █   █ ▄▀▄ █▀▄ █▄▀
------ █▀ █▀▄ █▀█ █ ▀ █ █▄▄ ▀▄▀▄▀ ▀▄▀ █▀▄ █ █
local frameworkAutoFind = function()
    if GetResourceState('es_extended') ~= 'missing' then
        return "ESX"
    elseif GetResourceState('qb-core') ~= 'missing' then
        return "QB-Core"
    end
end

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

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

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

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



------ █▄ ▄█ ▄▀▄ █ █▄ █   ▄▀▀ ██▀ ▀█▀ ▀█▀ █ █▄ █ ▄▀  ▄▀▀
------ █ ▀ █ █▀█ █ █ ▀█   ▄██ █▄▄  █   █  █ █ ▀█ ▀▄█ ▄██
---@field AutoExecuteQuery boolean: Automatic creation of tables required for vms_garagesv2
Config.AutoExecuteQuery = true

---@field Debug boolean: 
Config.Debug = false

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

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)

---@field DefaultRoutingBucket number: Routing bucket in which every player is, the default is 0
Config.DefaultRoutingBucket = 0

---@class Marker Below you can configure the markers for each point
Config.Marker = {
    ['management_business'] = {
        distanceSee = 10.0,
        distanceAccess = 1.8,
        type = 36,
        color = {50, 168, 82, 175},
        rotation = vec(0.0, 0.0, 0.0),
        scale = vec(0.5, 0.5, 0.5),
        bobUpAndDown = true,
        rotate = true,
        textureDict = nil,
        textureName = nil,
        drawOnEnts = false,
    },
    ['enter_garage_veh'] = {
        distanceSee = 10.0,
        distanceAccess = 1.8,
        type = 36,
        color = {50, 168, 82, 175},
        rotation = vec(0.0, 0.0, 0.0),
        scale = vec(0.5, 0.5, 0.5),
        bobUpAndDown = true,
        rotate = true,
        textureDict = nil,
        textureName = nil,
        drawOnEnts = false,
    },
    ['enter_garage'] = {
        distanceSee = 12.0,
        distanceAccess = 1.8,
        type = 20,
        color = {50, 168, 82, 175},
        rotation = vec(0.0, 0.0, 0.0),
        scale = vec(0.2, 0.2, 0.2),
        bobUpAndDown = true,
        rotate = true,
        textureDict = nil,
        textureName = nil,
        drawOnEnts = false,
    },
    ['exit_garage_veh'] = {
        distanceSee = 10.0,
        distanceAccess = 1.8,
        type = 36,
        color = {255, 168, 82, 175},
        rotation = vec(0.0, 0.0, 0.0),
        scale = vec(0.5, 0.5, 0.5),
        bobUpAndDown = true,
        rotate = true,
        textureDict = nil,
        textureName = nil,
        drawOnEnts = false,
    },
    ['exit_garage'] = {
        distanceSee = 12.0,
        distanceAccess = 1.8,
        type = 20,
        color = {255, 168, 82, 175},
        rotation = vec(0.0, 0.0, 0.0),
        scale = vec(0.2, 0.2, 0.2),
        bobUpAndDown = true,
        rotate = true,
        textureDict = nil,
        textureName = nil,
        drawOnEnts = false,
    },
    ['garage_menu'] = {
        distanceSee = 10.0,
        distanceAccess = 1.8,
        type = 20,
        color = {50, 168, 82, 175},
        rotation = vec(0.0, 180.0, 0.0),
        scale = vec(0.2, 0.2, 0.2),
        bobUpAndDown = true,
        rotate = true,
        textureDict = nil,
        textureName = nil,
        drawOnEnts = false,
    },
    ['return_vehicle'] = {
        distanceSee = 25.0,
        distanceAccess = 3.5,
        type = 21,
        color = {50, 168, 82, 175},
        rotation = vec(0.0, 180.0, 0.0),
        scale = vec(0.8, 0.8, 0.8),
        bobUpAndDown = false,
        rotate = true,
        textureDict = nil,
        textureName = nil,
        drawOnEnts = false,
    },
    ['impound'] = {
        distanceSee = 10.0,
        distanceAccess = 1.8,
        type = 29,
        color = {50, 168, 82, 175},
        rotation = vec(0.0, 0.0, 0.0),
        scale = vec(0.2, 0.2, 0.2),
        bobUpAndDown = true,
        rotate = true,
        textureDict = nil,
        textureName = nil,
        drawOnEnts = false,
    },
    ['parking_space'] = {
        distanceSee = 5.0,
        distanceAccess = 1.8,
        type = 21,
        color = {20, 240, 10, 175},
        rotation = vec(180.0, 0.0, 0.0),
        scale = vec(0.2, 0.2, 0.2),
        bobUpAndDown = false,
        rotate = true,
        textureDict = nil,
        textureName = nil,
        drawOnEnts = false,
    },
    ['pay_station'] = {
        distanceSee = 10.0,
        distanceAccess = 1.8,
        type = 29,
        color = {50, 168, 82, 175},
        rotation = vec(0.0, 0.0, 0.0),
        scale = vec(0.2, 0.2, 0.2),
        bobUpAndDown = false,
        rotate = true,
        textureDict = nil,
        textureName = nil,
        drawOnEnts = false,
    },
}

---@class Blips Below you can configure blips for each garage and impound 
Config.Blips = {
    ['impound:vehicle'] = {
        sprite = 317,
        display = 4,
        scale = 0.9,
        color = 41,
        name = "Impound"
    },
    
    ['free_garage:vehicle'] = {
        sprite = 357,
        display = 4,
        scale = 0.9,
        color = 3,
        name = "Garage"
    },
    ['free_garage:boat'] = {
        sprite = 356,
        display = 4,
        scale = 0.9,
        color = 3,
        name = "Garage"
    },
    ['free_garage:plane'] = {
        sprite = 359,
        display = 4,
        scale = 0.9,
        color = 3,
        name = "Hangar"
    },
    ['free_garage:helicopter'] = {
        sprite = 360,
        display = 4,
        scale = 0.9,
        color = 3,
        name = "Garage"
    },

    ['paid_garage:vehicle'] = {
        sprite = 369,
        display = 4,
        scale = 0.9,
        color = 11,
        name = "Paid Garage"
    },
    ['paid_garage:boat'] = {
        sprite = 371,
        display = 4,
        scale = 0.9,
        color = 11,
        name = "Paid Garage"
    },
    ['paid_garage:plane'] = {
        sprite = 372,
        display = 4,
        scale = 0.9,
        color = 11,
        name = "Paid Garage"
    },
    ['paid_garage:helicopter'] = {
        sprite = 370,
        display = 4,
        scale = 0.9,
        color = 11,
        name = "Paid Garage"
    },

    ['rent_garage:vehicle'] = {
        sprite = 369,
        display = 4,
        scale = 0.9,
        color = 12,
        name = "Rent Garage"
    },
    ['rent_garage:boat'] = {
        sprite = 371,
        display = 4,
        scale = 0.9,
        color = 12,
        name = "Rent Garage"
    },
    ['rent_garage:plane'] = {
        sprite = 372,
        display = 4,
        scale = 0.9,
        color = 12,
        name = "Rent Garage"
    },
    ['rent_garage:helicopter'] = {
        sprite = 370,
        display = 4,
        scale = 0.9,
        color = 12,
        name = "Rent Garage"
    },

    ['job_garage'] = {
        sprite = 357,
        display = 4,
        scale = 0.9,
        color = 38,
        name = "Job Garage"
    },
    
}

------ ▄▀▀ ▄▀▄ █▄ █ █▀ █ ▄▀  █ █ █▀▄ ▄▀▄ ▀█▀ █ ▄▀▄ █▄ █
------ ▀▄▄ ▀▄▀ █ ▀█ █▀ █ ▀▄█ ▀▄█ █▀▄ █▀█  █  █ ▀▄▀ █ ▀█
---@field AllowAllToParking boolean: Any player can park a vehicle in parking lots (even if the vehicle does not belong to him)
Config.AllowAllToParking = true

---@field AllowAllToPullOut boolean: If you lock the vehicle, no one will be able to take it, but if you leave it open or someone uses a lock pick, then they will be able to take it.
Config.AllowAllToPullOut = false

---@field AllowParkingCompanyVehiclesEverywhere boolean: If you set true, then when you have a company vehicle, such as an ambulance, you can park it anywhere, not just in the company garage/parking lot.
Config.AllowParkingCompanyVehiclesEverywhere = true

---@field AllowTransferBetweenGarages boolean: Allow players the ability to transfer between garages that are as menus
Config.AllowTransferBetweenGarages = true
Config.TransferBetweenGaragesPrice = 500

---@field VehiclesLoadDistance number: From what distance the vehicles will be visible (25m is the optimal value, it will not burden the client and the player will see nearby vehicles)
Config.VehiclesLoadDistance = 25

---@field DisplayParkingTimer boolean: Display of time for how long the vehicle is parked 
Config.DisplayParkingTimer = true
Config.ParkingTimerScale = 0.95

---@field MaxSpeedToPark number: The maximum speed at which a player can press a key to park a vehicle.
Config.MaxSpeedToPark = 3.0 -- it's GetEntitySpeed

---@class VehicleTypes Below you can configure the label and the default impound to which the vehicle will be moved when the player leaves the vehicle unparked until the server restarts.
Config.VehicleTypes = {
    ['vehicle'] = {name = "vehicle", label = "vehicle", defaultImpound = "Impound1", autoAddToImpoundAfterRestart = true},
    ['boat'] = {name = "boat", label = "boat", defaultImpound = "ImpoundBoat", autoAddToImpoundAfterRestart = true},
    ['plane'] = {name = "plane", label = "plane", defaultImpound = "ImpoundPlane", autoAddToImpoundAfterRestart = true},
    ['helicopter'] = {name = "helicopter", label = "helicopter", defaultImpound = "ImpoundHeli", autoAddToImpoundAfterRestart = true}
}

---@class CustomVehicleLabels Enter your custom labels for vehicle models
Config.CustomVehicleLabels = {
    [joaat('c63w205')] = 'Mercedes-Benz C63S',
}

---@class AddVehicleKeysOn When the player should receive the keys to the vehicle (config.client.lua - CL.GiveVehicleKeys)
Config.AddVehicleKeysOn = {
    companyVehFromImpound = true, -- pulling out company vehicle from impounds
    privateVehFromImpound = true, -- pulling out vehicle from impounds

    companyVehFromParking = true, -- pulling out company vehicle from parkings
    privateVehFromParking = true, -- pulling out vehicle from parkings
    
    companyOwnedVehFromGarage = true, -- pulling out owned company vehicle from garage menu
    companyVehFromGarage = true, -- pulling out company vehicle from garage menu
    privateVehFromGarage = true -- pulling out vehicle from garage menu
}

---@class RemoveVehicleKeysOn When the player's vehicle keys are to be taken away (config.client.lua - CL.RemoveVehicleKeys)
Config.RemoveVehicleKeysOn = {
    companyVehToParking = false, -- parking the company vehicle on parkings
    privateVehToParking = false, -- parking the vehicle on parkings
    
    companyOwnedVehToGarage = true, -- parking the owned company vehicle on garage
    companyVehToGarage = true, -- parking the company vehicle on garage
    privateVehToGarage = false -- parking the vehicle on garage
}

---@class CompanyGrades Here you need to enter information about the works that will have the ability to transcribe a private vehicle to a company vehicle and a registered job garage in Config.Garages
Config.CompanyGrades = {
    ['police'] = {
        ['0'] = { -- Recruit
            label = "Recruit",
        },
        ['1'] = { -- Officer
            label = "Officer",
        },
        ['2'] = { -- Sergeant
            label = "Sergeant",
        },
        ['3'] = { -- lieutenant
            label = "Lieutenant",
        },
        ['4'] = { -- Boss
            label = "Boss",
            isBoss = true, -- This will enable this rank to order and transfer vehicles for employees
        },
    },
    ['ambulance'] = {
        ['0'] = {
            label = "Recruit",
        },
        ['1'] = {
            label = "Doctor",
        },
        ['2'] = {
            label = "Chief Doctor",
        },
        ['3'] = {
            label = "Boss",
            isBoss = true, -- This will enable this rank to order and transfer vehicles for employees
        },
    }
}

---@class RandomGarageAnims When you enter the garage/impound, the player will play one of the following animations.
Config.RandomGarageAnims = {
    {"rcmnigel1a", "base"},
    {"rcmjosh1", "idle"},
    {"anim@heists@humane_labs@finale@strip_club", "ped_b_celebrate_loop"},
    {"random@street_race", "_car_b_lookout"},
    {"anim@amb@casino@hangout@ped_male@stand@02b@idles", "idle_a"}
}

---@class GiveVehicleCommand 
Config.GiveVehicleCommand = {
    enabled = true,
    oldESX = false,
    name = "givecar",
    groups = 'admin',
    help = "Add a vehicle to the garage",
    suggestions = {
        {label = "Player ID or Job Name for company"},
        {label = "Vehicle Type (vehicle/boat/helicopter/plane)"},
        {label = "Vehicle Model"},
        {label = "License Plate Number (_ = space) (* Max 8 characters, special characters cannot be used!)"},
    }
}



------ █ █▄ ▄█ █▀▄ ▄▀▄ █ █ █▄ █ █▀▄
------ █ █ ▀ █ █▀  ▀▄▀ ▀▄█ █ ▀█ █▄▀
---@field TowMenuCommand string: Command with which the player can open the tow menu
Config.TowMenuCommand = 'tow'

---@field MaxTowFineAmount number: Maximum fine amount that a player can set for impound
Config.MaxTowFineAmount = 12000

---@field MinTowFineAmount number: Minimum fine amount that a player can set for impound
Config.MinTowFineAmount = 0

---@field MaxTowFineCharacters number: The maximum number of characters for the fine title that a player can set for impound
Config.MaxTowFineCharacters = 250

---@field MinTowFineCharacters number: The minimum number of characters for the fine title that a player can set for impound
Config.MinTowFineCharacters = 0

---@class AllowJobImpoundsTakeVehWithoutPaying 
Config.TowMenuJobsAccess = {
    ['mechanic'] = {
        label = "Mechanic",
        impoundsAvailable = {
            ['vehicle'] = 'Impound1',
            ['boat'] = 'ImpoundBoat',
            ['plane'] = 'ImpoundPlane',
            ['helicopter'] = 'ImpoundHeli',
        },
    },
    ['police'] = {
        label = "Police",
        impoundsAvailable = {
            ['vehicle'] = {
                'ImpoundPolice',
                'Impound1'
            },
            ['boat'] = 'ImpoundBoat',
            ['plane'] = 'ImpoundPlane',
            ['helicopter'] = 'ImpoundHeli',
        },
    },
}

---@field AllowJobImpoundsTakeVehWithoutPaying boolean: This will enable the vehicle to be removed from the impound without the customer having to pay.
Config.AllowJobImpoundsTakeVehWithoutPaying = true

---@class AutomaticImpound 
Config.AutomaticImpound = {
    ['vehicle'] = {
        impounded_by = "City Services",
        fine_title = "Leaving a vehicle in a place not intended for it.",
        fine_amount = 200,
    },
    ['boat'] = {
        impounded_by = "City Services",
        fine_title = "Leaving a vehicle in a place not intended for it.",
        fine_amount = 400,
    },
    ['plane'] = {
        impounded_by = "City Services",
        fine_title = "Leaving a vehicle in a place not intended for it.",
        fine_amount = 2600,
    },
    ['helicopter'] = {
        impounded_by = "City Services",
        fine_title = "Leaving a vehicle in a place not intended for it..",
        fine_amount = 2000,
    },
}



------ █▀▄ ▄▀▄ █ █▀▄   █▀▄ ▄▀▄ █▀▄ █▄▀ █ █▄ █ ▄▀ 
------ █▀  █▀█ █ █▄▀   █▀  █▀█ █▀▄ █ █ █ █ ▀█ ▀▄█
---@field NeedPayForParking boolean: Does the player have to pay at the parking meter for parking (In future updates there will be additional options for this)
Config.NeedPayForParking = true



------ █▄█ ▄▀▄ █ █ ▄▀▀ ██▀   ▄▀  ▄▀▄ █▀▄ ▄▀▄ ▄▀  ██▀ ▄▀▀
------ █ █ ▀▄▀ ▀▄█ ▄██ █▄▄   ▀▄█ █▀█ █▀▄ █▀█ ▀▄█ █▄▄ ▄██
---@field DebugHouseGaragesZones boolean: You can debug areas to which garages belong to houses
Config.DebugHouseGaragesZones = false

---@field VehiclesHouseGaragesAlwaysOpen boolean: Whether all vehicles in the garage belonging to the house should always be open (If true, then when a player steals a vehicle from another player, he will be able to use it)
Config.VehiclesHouseGaragesAlwaysOpen = true



------ ▄▀▀ ▄▀▄ █   ██▀   ▄▀▄ ▄▀  █▀▄ ██▀ ██▀ █▄ ▄█ ██▀ █▄ █ ▀█▀
------ ▄██ █▀█ █▄▄ █▄▄   █▀█ ▀▄█ █▀▄ █▄▄ █▄▄ █ ▀ █ █▄▄ █ ▀█  █ 
---@field UseSaleAgreement boolean: Do you want to use the script built-in option to sell your vehicle
Config.UseSaleAgreement = true

Config.AgreementPaymentMethods = {'cash', 'bank'}

---@field UseSaleAgreementItem boolean: The ability to open a vehicle sales agreement with item.
Config.UseSaleAgreementItem = false
Config.SaleAgreementItem = 'sale_agreement_vehicle'

---@field UseSaleAgreementCommand boolean: The ability to open a vehicle sales agreement with command.
Config.UseSaleAgreementCommand = true
Config.SaleAgreementCommand = 'sellvehicle'

---@class SaleBlacklistVehicles You can prevent players from selling individual vehicles
Config.SaleBlacklistVehicles = {
    [GetHashKey('rhino')] = true,
    [GetHashKey('police')] = true,
    [GetHashKey('police2')] = true,
    [GetHashKey('police3')] = true,
}



------ █   ▄▀▄ ▄▀▀ ▄▀▄ ▀█▀ ▄▀▄ █▀▄
------ █▄▄ ▀▄▀ ▀▄▄ █▀█  █  ▀▄▀ █▀▄
---@field AllowImpoundLocator boolean: This will allow players to locate a vehicle when it is currently spawned on the server.
Config.AllowImpoundLocator = true
Config.PriceOfLocationCheck = 250

---@field UseVMSTuningLocator boolean: If you are using vms_tuning min. v2.0.4, you can use the required locator installation.
Config.UseVMSTuningLocator = false

Config.LocatorBlip = {
    usePreciseLocation = true,

    radiusNotPrecise = 200.0,

    showTime = 20000,

    sprite = 465,
    display = 4,
    scale = 0.9,
    color = 15,

    name = "Located Vehicle"
}

Last updated