# Developer Notes

**`Vehicle Despawn`**&#x20;

This script does **NOT** despawn vehicles unless someone views a vehicle that has expired or the script was restarted. If vehicles spawn on the lot and have disappeared make sure you do not have a conflicting script that is deleting vehicles.

Restarting the script will force delete all previously spawned vehicles so that duplicates are not made.

**`State Bags`**&#x20;

The following statebag is set to any vehicle spawned on a used lot and you can use this to integrate into other scripts as needed. You may add more in the config as needed.

```lua
--Disables lockpicking for mk_vehiclekeys
Entity(vehicle).state.LockpickDisabled = true
```

**`Vehicle Pricing`**&#x20;

* QBCORE
  * Vehicle pricing info is pulled directly from `QBCore.Shared.Vehicles` table
  * Change this by editing `mk_utils/bridge/client/qb.lua/` `framework.getVehiclePrice` function
* ESX
  * Vehicle pricing info is pulled directly from the `vehicles` database table on script start
  * Change this by editing `mk_utils/bridge/client/esx.lua/` `framework.getVehiclePrice` function

**`Vehicle Classes`**&#x20;

Vehicle class list for configuring `locations.lua`&#x20;

```
0: Compacts  
1: Sedans  
2: SUVs  
3: Coupes  
4: Muscle  
5: Sports Classics  
6: Sports  
7: Super  
8: Motorcycles  
9: Off-road  
10: Industrial  
11: Utility  
12: Vans  
13: Cycles  
14: Boats  
15: Helicopters  
16: Planes  
17: Service  
18: Emergency  
19: Military  
20: Commercial  
21: Trains  
22: Open Wheel 
```

**`LotPoly`**&#x20;

To setup a new used lot polyzone use the `ox_lib` `/zone` command to get your coordinates

{% embed url="<https://youtu.be/S1PR1wDwc1M>" %}
