ESX
es_extended
Add Keys (server side)
View the code on GitHub: ex_extended/server/modules/onesync.lua
Add the line of code exactly as seen in the screenshot below.
TriggerClientEvent('cd_garage:AddKeys', xPlayer.id, GetVehicleNumberPlateText(createdVehicle))
Still don't receive keys?
If you don't receive keys to a vehicle, most likely, one of your resources does not use any of the ESX spawn vehicle functions, so you will need to refer to #VehicleKeys and add the event to that resource.
Add Keys (client side)
View the code on GitHub: ex_extended/client/functions.lua
Add the line of code exactly as seen in the screenshot below.
TriggerEvent('cd_garage:AddKeys', exports['cd_garage']:GetPlate(vehicle))
Still don't receive keys?
If you don't receive keys to a vehicle, most likely, one of your resources does not use any of the ESX spawn vehicle functions, so you will need to refer to #VehicleKeys and add the event to that resource.
Remove Persistent Vehicles
View the code on GitHub: es_extended/client/functions.lua
Add the line of code exactly as seen in the screenshot below.
TriggerServerEvent('cd_garage:RemovePersistentVehicles', exports['cd_garage']:GetPlate(vehicle))
Do vehicles still respawn after deleting them?
If vehicles still respawn after being deleted, it’s likely that one of your resources does not use the ESX delete vehicle function. You will need to refer to #PersistentVehicles and add the necessary event to that resource.
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.
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.
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},
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.
TriggerEvent('cd_garage:UpdateGarageType')
Last updated
Was this helpful?

