# Installation

First we want you to know that our script only supports the following versions of the two most used frameworks, in older versions it may be usable but we do not provide support since the development focuses on the following versions:

{% tabs %}
{% tab title="QBCore" %}

```
ensure oxmysql/icmysql
ensure qb-core
...(make sure to start the inventory before the script)

ensure origen_dealerships
```

#### Now you have to insert the SQL files into your database:

{% endtab %}

{% tab title="ESX" %}

```
ensure oxmysql/icmysql
ensure es_extended
...(make sure to start the inventory before the script)

ensure origen_dealerships
```

#### Now you have to insert the SQL files into your database:

[origen\_dealerships/database.sql](https://docs.origennetwork.store/origen-dealerships/installation/sql)

**Command to use the script:** `/dealer`
{% endtab %}
{% endtabs %}

{% hint style="warning" %}
We recommend uploading our script files without using FileZilla, as the upload process may corrupt our scripts. As a recommendation, please use WinSCP or other reliable programs to upload the files.
{% endhint %}

#### Config File

```lua
Config.Debug = false
Config.Language = 'en'

Config.LoadDistance = 50.0
Config.UnloadDistance = 100.0
Config.UpdateInterval = 1000

Config.NPCInteractDistance = 3.0

Config.SetupMenu = {
    vehiclePlacing = 'adder'
}

Config.DealershipMenu = {
    defaultVehicleModel = 'sultan'
}

Config.TestDrive = {
    Timer = 60 * 1000,
    plate = 'TESTDRIVE',
}

Config.VehiclePurchase = {
    defaultGarage = 'garaje_central', -- Default garage where the vehicle will be saved
    spawnVehicle = true, -- If true, the vehicle will be spawned when buying it, if false only save it in the garage
    giveKeysOnPurchase = true, -- If true, give the keys of the vehicle when buying it
    useOxLibProps = true, -- If true, use ox_lib for the vehicle properties
}

Config.Markers = {
    blips = {
        sprite = 524,
        color = 5,
        scale = 0.7,
        name = "Dealership",
    }
}

Config.FinancingConfig = {
    enabled = true,
    timeUnit = 'days', -- days, weeks, months, years
    maxPeriods = 12, -- max time in datatype
    interestRate = 5, -- interest rate in percentage per datatype time
    payInitialPercentage = 30, -- initial payment percentage or 0 to disable
    cronExpression = '*/10 * * * *', -- Check every 10 minutes using cron
    maxDelayedPayments = 3, -- Número máximo de cuotas que se pueden retrasar
}

Config.Camera = {
    enableCollisionCheck = false, -- Enable/Disable camera collision check
}

-- Configuración de grupos de administrador
Config.AdminGroups = {
    ['qb-core'] = {
        'admin',
        'god',
        'superadmin'
    },
    ['esx'] = {
        'admin',
        'superadmin',
        'mod'
    },
    ['qbx'] = {
        'admin',
        'god',
        'superadmin'
    }
}
```
