โš ๏ธImportant Notes

Upon performing all the steps mentioned before, you can witness a folder data with all the vehicles informations same like vehicles.lua for qb-core.

Here You can go both way on adding new vehicles:

  1. You can add new vehicles directly to data folder in the mm_dealership and vehicles.lua in QBCore

  1. You can add new vehicles to mm_dealership only.

Client Side Event to Update QBCore.Shared.Vehicles

RegisterNetEvent('Dealership:Client:UpdateVeh', function(data)
    QBCore.Shared.Vehicles = data
end)

Server Side Event to Update QBCore.Shared.Vehicles

RegisterNetEvent('Dealership:Server:UpdateVeh', function(data)
    QBCore.Shared.Vehicles = data
end)

Events are used to update vehicles.lua for scripts which starts before mm_dealership

Export to Update QBCore.Shared.Vehicles

local vehicles = exports.mm_dealership.GetVehicles()
QBCore.Shared.Vehicles = vehicles

Exports are used to update vehicles.lua for scripts which starts after mm_dealership

Last updated