Developer Notes

Vehicle Despawn

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

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.

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

Vehicle Pricing

  • 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

Vehicle class list for configuring locations.lua

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

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

Last updated