Configurations

The following config has been designed to provide highly flexible settings, allowing users to customize the script according to their specific needs. With its adjustable parameters, this script aims to cater to a wide range of requirements and ensure optimal adaptability.

Framework

Defines the used Framework to allow the Script to be used on more servers. Frameworks which are supported by default are ESX Legacy, QBCore and Standalone. If you want to add your own Framework you can use bridge functions to do so. More information about the Bridge can be found here.

Config.Framework = "ESX"
  • frameworkName: string
⚠️

Please keep in mind that the script has only been tested with ESX Legacy. Thus the QBCore Version is only available at you own risk. If you want to make changes to the QBCore code you can do so in the Bridge section. More information about the Bridge can be found here.

Lock Distance

Defines the max distance within wich the player can lock or unlock a car.

Config.LockDistance = 3

Default Lock Key

This Script uses Keymappings to make sure that every player can individually dicide wich key they want to map to lock their cars. This config determines the default key, that can later be changed by the player.

Config.DefaultLockKey = "L"

Garages

This is the main configuration as it defines new garages and their properties. We have implemented intelligent logic that seamlessly adapts to changes made to individual components during runtime, ensuring that the script remains functional even when certain components are modified or removed.

Please note that not every component can be removed. Components that can be removed will be marked with a '?' symbol following their name (e.g., Blip?).

Config.Garages = {
    ["police"] = {
        Label = "Police Garage",
        Job = 'police', 
        Coords = vec4(459.08, -1017.17, 28.15, 94.46),
        PedModel = 's_m_m_ciasec_01',  
        SpawnCoords = vec4(446.03, -1025.89, 28.65, 358.07), 
        Blip = {
            id = 1, 
            scale = 0.8, 
            colour = -1,
        },
        Vehicles = {
            ['police'] = {
                label = 'Police Interceptor',
                grade = 5, 
                defaultExtras = {
                    [1] = true, 
                }
            },
            ['police2'] = {
                label = 'Police Interceptor 2',
                grade = 10, 
                livery = 1,
                defaultExtras = {
                    [1] = true, 
                    [12] = true,
                },
                modKits = {
                    [11] = 5,
                    [12] = 4
                }
            },
        }
    },
    ...
}

Every Garage is identified by its key. The key represents the garage and contains all the options.

  • Label: string
  • Job?: string
  • Coords: vector3 or vector4
  • PedModel?: string
  • SpawnCoords?: vector4
  • Blip?: table
    • Creates a blip on the map if added as an option.
    • id: number
    • scale: number,
    • color: number

example:

Blip = {
    id = 1, 
    scale = 0.8, 
    colour = -1,
},
  • Vehicles: table

    • Contains a list of every vehicle in the garage.
    ⚠️

    Every vehicle is represented via a key, value pair. This means that the vehicle spawn name is registered within it's key (e.g ['police']) and all the options in the value wich are within a table.

    • label: string
    • grade?: number (the grade required to use the vehicle)
    • livery?: number
    • defaultExtras?: table

    Every entry in the defaultExtras table is registered as a key, value pair. This means that the extra you want to enable should have a key with a number (e.g. [1]) and the value true.

    example:

    defaultExtras = {
        [1] = true, 
        [12] = true,
        ...
    }
    • modKits?: table

    Every entry in the modKits table is registered as a key, value pair. This means that the modkit you want to enable should have a key with a number (e.g. [1]) and the index of the modkit as the value. You can find our more about modkits here (opens in a new tab)

    example:

    modKits = {
        [11] = 5,
        [12] = 4
    }

example:

Vehicles = {
    ['police'] = {
        label = 'Police Interceptor',
        grade = 5, 
    },
    ['police2'] = {
        label = 'Police Interceptor 2',
        grade = 10, 
        defaultExtras = {
            [1] = true, 
            [12] = true,
        }
    },
    ...
}