Skip to content

Integration Guides

Add Key

es_extended

View the code on GitHub: ex_extended/client/functions.lua

Add the line of code exactly as seen in the screenshot below.

ex_extended/client/functions.lua — line 570
lua
TriggerEvent('cd_garage:AddKeys', exports['cd_garage']:GetPlate(vehicle))

okok-vehicleshop

Add the line of code exactly as seen in the screenshot below.

okokVehicleShop/cl_utils.lua — line 33 (approx)
lua
TriggerEvent('cd_garage:AddKeys', plate)
TriggerEvent('cd_garage:RemoveKeys', plate)

Housing

ps-housing

View the code on GitHub: ps-housing/client/cl_property.lua.

Replace whole function.

Job Garage

esx_policejob

Personal Owned Job Garage

View the code on GitHub: esx_policejob/server/main.lua

REPLACE the line of code exactly as seen in the screenshot below.

esx_policejob/server/main.lua — line 377
sql
MySQL.insert('INSERT INTO owned_vehicles (owner, vehicle, plate, type, job_personalowned, `stored`) VALUES (?, ?, ?, ?, ?, ?)', { xPlayer.identifier, json.encode(vehicleProps), vehicleProps.plate, type, xPlayer.job.name, true},

Society Owned Job Garage

View the code on GitHub: esx_policejob/server/main.lua

REPLACE the line of code exactly as seen in the screenshot below.

esx_policejob/server/main.lua — line 377
sql
MySQL.insert('INSERT INTO owned_vehicles (owner, vehicle, plate, type, job, `stored`) VALUES (?, ?, ?, ?, ?, ?)', { xPlayer.job.name, json.encode(vehicleProps), vehicleProps.plate, type, xPlayer.job.name, true},

Remove Persistent Vehicle

es_extended

View the code on GitHub: es_extended/client/functions.lua

Add the line of code exactly as seen in the screenshot below.

es_extended/client/functions.lua — line 23
lua
TriggerServerEvent('cd_garage:RemovePersistentVehicles', exports['cd_garage']:GetPlate(vehicle))

Do vehicles still respawn after deleting them?


  • If deleted vehicles still respawn, one of your resources may not be using the ESX delete vehicle function.
  • Go to #persistent-vehicles.
  • Add the required delete vehicle event to that resource.

Garage Type

esx_boat

Update Garage Type

View the code on GitHub: esx_boat/client/main.lua

Add the line of code exactly as seen in the screenshot below.

esx_boat/client/main.lua — line 122
lua
TriggerEvent('cd_garage:UpdateGarageType')

okok-vehicleshop

Set garage type after a vehicle is purchased (for boats and air vehicles)

Add the line of code exactly as seen in the screenshot below.

lua
TriggerClientEvent('cd_garage:UpdateGarageType', source)

qb-vehicleshop

View the code on GitHub: qb-vehicleshop/client/main.lua

Add the line of code exactly as seen in the screenshot below.

qb-vehicleshop/client/main.lua — approx. line 657
lua
TriggerEvent('cd_garage:UpdateGarageType')

Hello!