🚗RHD Garage

Garage scripts for ESX and QBCore frameworks

Follow the garage installation method so that there are no mistakes

Installation


  1. Install the dependencys

  2. Extract rhd_garage into your resources

  3. Run the SQL provided in the SQL folder

If you use QB-Phone then you have to change several codes as below

QB-Phone
  • Original

client/main.lua
-- line 302
PhoneData.GarageVehicles = exports.rhd_garage:getvehForPhone()
client/main.lua
-- line 860
RegisterNUICallback('track-vehicle', function(data, cb)
    local veh = data.veh
    local success = exports.rhd_garage:trackveh(veh.plate, veh.garage)
    if success and not veh.disableTracking then
        QBCore.Functions.Notify("Your vehicle has been marked", "success")
    else
        QBCore.Functions.Notify("This vehicle cannot be located", "error")
    end
    cb("ok")
end)
  • Renewed-Scripts

client/garage.lua
-- line 21
RegisterNUICallback('SetupGarageVehicles', function(_, cb)
    vehicles = exports.rhd_garage:getvehForPhone()
end)
client/garage.lua
-- line 27
RegisterNUICallback('gps-vehicle-garage', function(data, cb)
    local veh = data.veh
    local success = exports.rhd_garage:trackveh(veh.plate, veh.garage)
    if success and not veh.disableTracking then
        QBCore.Functions.Notify("Your vehicle has been marked", "success")
    else
        QBCore.Functions.Notify("This vehicle cannot be located", "error")
    end
    cb("ok")
end)
  1. Start rhd_garage in server.cfg

Last updated