mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-17 22:06:02 +01:00
tweak(server/vehicle): removing keys on parking
This commit is contained in:
@@ -210,14 +210,7 @@ function NDCore.giveVehicleAccess(source, vehicle, access, info)
|
||||
vehNetId = netId
|
||||
})
|
||||
elseif not access and hasKey then
|
||||
ox_inventory:RemoveItem(source, "keys", 1, {
|
||||
vehOwner = owner or state.owner,
|
||||
vehId = vehicleId,
|
||||
vehPlate = plate,
|
||||
vehModel = modelName,
|
||||
keyEnabled = true,
|
||||
vehNetId = netId
|
||||
})
|
||||
ox_inventory:RemoveItem(source, "keys", 1, nil, hasKey)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -639,6 +632,11 @@ RegisterNetEvent("ND_Vehicles:storeVehicle", function(netId)
|
||||
position = "bottom",
|
||||
duration = 3000
|
||||
})
|
||||
NDCore.giveVehicleAccess(src, vehicle.entity, false, {
|
||||
vehicleId = vehicle.id,
|
||||
netId = vehicle.netId,
|
||||
owner = vehicle.owner
|
||||
})
|
||||
end)
|
||||
|
||||
local function isParkingAvailable(locations)
|
||||
|
||||
Reference in New Issue
Block a user