This commit is contained in:
FullGas1 2025-03-23 16:58:32 +01:00
parent 08ebd7e82d
commit 61d9e206b2

View File

@ -2058,10 +2058,11 @@ function ctld.repackVehicle(_params,t) -- scan rrs table 'repackRequestsStack'
local repackableUnitName = v[1].repackableUnitName
local crateWeight = v[1].weight
local repackableUnit = Unit.getByName(repackableUnitName)
local PlayerTransportUnit = Unit.getByName(v[2][1])
local TransportUnit = ctld.getTransportUnit(PlayerTransportUnitName)
local spawnRefPoint = PlayerTransportUnit:getPoint()
local refCountry = PlayerTransportUnit:getCountry()
local TransportUnit = ctld.getTransportUnit(PlayerTransportUnitName)
local spawnRefPoint = PlayerTransportUnit:getPoint()
local refCountry = PlayerTransportUnit:getCountry()
if repackableUnit then
if repackableUnit:isExist() then
@ -2081,7 +2082,6 @@ function ctld.repackVehicle(_params,t) -- scan rrs table 'repackRequestsStack'
end
ctld.repackRequestsStack[ii] = nil
end
end
return 3 -- reschedule the function in 3 seconds
end