Skip to content

Commit

Permalink
fix: if qbx_vehiclekeys is running, lock using it (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
Manason authored Nov 11, 2024
1 parent 19a86d6 commit cc29d8b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/spawn-vehicle.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cc29d8b

Please sign in to comment.