# Script Install

**Dependencies**

* One Sync Infinity
* [\[ox\_lib\]](https://github.com/overextended/ox_lib/releases)
* [\[oxmysql\]](https://github.com/overextended/oxmysql/releases/tag/v2.7.5)
* \[mk\_utils] (Provided with script)
* Targeting Resource
  * [\[qb-target\]](https://github.com/qbcore-framework/qb-target/releases)
  * [\[ox\_target\]](https://github.com/overextended/ox_target/releases)
  * Setup custom inside \[mk\_utils] `cl_target.lua`
* Supported Framework
  * QBCORE&#x20;
  * QBX
  * ESX&#x20;
  * Custom (Setup inside \[mk\_utils] bridge files)

**Install Steps**

* Install Dependencies
* Download \[mk\_utils] from Keymaster (access provided with script purchase)
  * ![](https://51694285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSadY5GIZVZCGCeog04Gq%2Fuploads%2FU5gkLPTZnoumv95rS1Tj%2Fmk_utils_download.png?alt=media\&token=099d5518-04ee-48a1-ad6a-ac37a56b9d4a)
* Add `mk_utils` to resource folder
* Add `mk_usedvehicles` to resource folder
* add `ensure mk_utils` into server.cfg (It must be added **BEFORE** mk\_usedvehicles)
* Add `ensure mk_usedvehicles` to server.cfg
* Run `UsedVehicles.sql` or run the following query into your database

{% code fullWidth="false" %}

```sql
CREATE TABLE IF NOT EXISTS `mk_usedvehicles` (
	`id` INT(11) NOT NULL AUTO_INCREMENT,
	`seller` VARCHAR(50) NULL DEFAULT NULL,
	`price` INT(11) NULL DEFAULT NULL,
	`description` LONGTEXT NULL DEFAULT NULL,
	`plate` VARCHAR(50) NULL DEFAULT NULL,
	`model` VARCHAR(50) NULL DEFAULT NULL,
	`mods` TEXT NULL DEFAULT NULL,
	`location` VARCHAR(100) NULL DEFAULT NULL,
	`spot` INT(11) NULL DEFAULT NULL,
	`vin_number` VARCHAR(50) NULL DEFAULT NULL,
	`expire_time` INT(32) NULL DEFAULT NULL,
	PRIMARY KEY (`id`) USING BTREE,
	INDEX `location` (`location`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

```

{% endcode %}

* Make sure `ox_lib` ace permissions are in `server.cfg`&#x20;

```lua
add_ace resource.ox_lib command.add_ace allow
add_ace resource.ox_lib command.remove_ace allow
add_ace resource.ox_lib command.add_principal allow
add_ace resource.ox_lib command.remove_principal allow
```

Your server.cfg should look similar to this when finished

<div align="left"><figure><img src="https://51694285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSadY5GIZVZCGCeog04Gq%2Fuploads%2Fp76LTocEW8YWSy5JC52Q%2Fcfg_used.png?alt=media&#x26;token=90c45259-a107-4172-9081-b21eed0b67fa" alt=""><figcaption></figcaption></figure></div>

If using `qb-core` and using the default script `qb-vehiclesales` you have to either disable/remove `qb-vehiclesales` or remove the location `Larrys` in this script as they use the same location and will cause issues if ran together

If using `qbx` and using the default script `qbx_vehiclesales` you have to either disable/remove `qbx_vehiclesales` or remove the location `sandyOccasions` in this script as they use the same location and will cause issues if ran together

Navigate to `config/locations.lua` For each Location you must set the `GarageReturn` to which garage a vehicle that is purchased from this lot will default to. Not doing this will prevent the script from running.

Example:

```lua
GarageReturn = 'pillboxgarage',
```

Setup [Inventory Integration](https://mankind-scripts.gitbook.io/documentation/scripts/used-vehicles/installation/inventory-integration)
