local timeout = 120
local currentTime = GameRules:GetGameTime()
for i=0, GameRules:NumDroppedItems() do
local phyItem = GameRules:GetDroppedItem(i)
if phyItem ~= nil then
if phyItem:GetCreationTime()+timeout <= currentTime then
phyItem:GetContainedItem():RemoveSelf()
phyItem:RemoveSelf()
end
end
end
А можно фул код?пжлстКак-то такКод:local timeout = 120 local currentTime = GameRules:GetGameTime() for i=0, GameRules:NumDroppedItems() do local phyItem = GameRules:GetDroppedItem(i) if phyItem ~= nil then if phyItem:GetCreationTime()+timeout <= currentTime then phyItem:GetContainedItem():RemoveSelf() phyItem:RemoveSelf() end end end
ну итемы дропнулись по истечению допустим 100 секунд они пропадаютЯ не знаю когда тебе нужно очищать карту от итемов и помочь не могу