Hi,
könnte so aussehen:
(Die Werte im Funktionsaufruf müssen durch deine ersetzt werden)
LKwCont = {"#2","#3","#4","#10","#11","#13","#14","#15","#16","#17","#18","#19","#20","#21","#22","#23"}
function LadungsName( _Soll_X, _Soll_Y, _toleranz)
for i, v in pairs(LKwCont) do
ok, PosX, PosY, PosZ = EEPGoodsGetPosition(v)
if (PosX > _Soll_X - _toleranz and PosX < _Soll_X + _toleranz) and (PosY > _Soll_Y - _toleranz and PosY < _Soll_Y + _toleranz) then
return v
end
end
end
print("Ladung hat die ID: "..LadungsName(11.3, -50.4, 0.5)) -- Funktionsaufruf
Alles anzeigen
LG