From 83a59b6ea78bb625615000c4c55320b896aae1ab Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 2 Nov 2024 20:29:43 -0700 Subject: [PATCH] fix: if qbx_vehiclekeys is running, lock using it --- server/spawn-vehicle.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/spawn-vehicle.lua b/server/spawn-vehicle.lua index 6e039e7..391b39f 100644 --- a/server/spawn-vehicle.lua +++ b/server/spawn-vehicle.lua @@ -46,7 +46,11 @@ lib.callback.register('qbx_garages:server:spawnVehicle', function (source, vehic local netId, veh = qbx.spawnVehicle({ spawnSource = spawnCoords, model = playerVehicle.props.model, props = playerVehicle.props, warp = warpPed}) if Config.doorsLocked then - SetVehicleDoorsLocked(veh, 2) + if GetResourceState('qbx_vehiclekeys') == 'started' then + TriggerEvent('qb-vehiclekeys:server:setVehLockState', netId, 2) + else + SetVehicleDoorsLocked(veh, 2) + end end TriggerClientEvent('vehiclekeys:client:SetOwner', source, playerVehicle.props.plate)