mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-17 05:56:01 +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
|
vehNetId = netId
|
||||||
})
|
})
|
||||||
elseif not access and hasKey then
|
elseif not access and hasKey then
|
||||||
ox_inventory:RemoveItem(source, "keys", 1, {
|
ox_inventory:RemoveItem(source, "keys", 1, nil, hasKey)
|
||||||
vehOwner = owner or state.owner,
|
|
||||||
vehId = vehicleId,
|
|
||||||
vehPlate = plate,
|
|
||||||
vehModel = modelName,
|
|
||||||
keyEnabled = true,
|
|
||||||
vehNetId = netId
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -639,6 +632,11 @@ RegisterNetEvent("ND_Vehicles:storeVehicle", function(netId)
|
|||||||
position = "bottom",
|
position = "bottom",
|
||||||
duration = 3000
|
duration = 3000
|
||||||
})
|
})
|
||||||
|
NDCore.giveVehicleAccess(src, vehicle.entity, false, {
|
||||||
|
vehicleId = vehicle.id,
|
||||||
|
netId = vehicle.netId,
|
||||||
|
owner = vehicle.owner
|
||||||
|
})
|
||||||
end)
|
end)
|
||||||
|
|
||||||
local function isParkingAvailable(locations)
|
local function isParkingAvailable(locations)
|
||||||
|
|||||||
Reference in New Issue
Block a user