diff --git a/resource/vehicleProperties/client.lua b/resource/vehicleProperties/client.lua index 3207789..1138039 100644 --- a/resource/vehicleProperties/client.lua +++ b/resource/vehicleProperties/client.lua @@ -12,6 +12,7 @@ if cache.game == 'redm' then return end ---@field model? number ---@field plate? string ---@field plateIndex? number +---@field lockState? number ---@field bodyHealth? number ---@field engineHealth? number ---@field tankHealth? number @@ -202,6 +203,7 @@ function lib.getVehicleProperties(vehicle) model = GetEntityModel(vehicle), plate = GetVehicleNumberPlateText(vehicle), plateIndex = GetVehicleNumberPlateTextIndex(vehicle), + lockState = GetVehicleDoorLockStatus(vehicle), bodyHealth = math.floor(GetVehicleBodyHealth(vehicle) + 0.5), engineHealth = math.floor(GetVehicleEngineHealth(vehicle) + 0.5), tankHealth = math.floor(GetVehiclePetrolTankHealth(vehicle) + 0.5), @@ -322,6 +324,10 @@ function lib.setVehicleProperties(vehicle, props, fixVehicle) SetVehicleNumberPlateTextIndex(vehicle, props.plateIndex) end + if props.lockState ~= nil then + SetVehicleDoorsLocked(vehicle, props.lockState) + end + if props.bodyHealth then SetVehicleBodyHealth(vehicle, props.bodyHealth + 0.0) end