detektálod a dimenzió váltást, aztán átmozgatod a mapot
példa:
local oldDim = getElementDimension(localPlayer)
local oldInt = getElementInterior(localPlayer)
local oldTick = getTickCount()
addEventHandler(\"onClientRender\", root, function()
local tick = getTickCount()
if tick-oldTick > 1000 then
local dim = getElementDimension(localPlayer)
local int = getElementInterior(localPlayer)
if dim ~= oldDim or int ~= oldInt then
oldDim = dim
oldInt = int
moveMap(\"resourceneve\")
end
end
end)
function moveMap(resName)
for k, v in ipairs(getElementsByType(\"object\", getResourceRootElement(getResourceFromName(resName)))) do
setElementInterior(v, oldInt)
setElementDimension(v, oldDim)
end
end
detektálod a dimenzió váltást, aztán átmozgatod a mapot
példa:
local oldDim = getElementDimension(localPlayer)
local oldInt = getElementInterior(localPlayer)
local oldTick = getTickCount()
addEventHandler(\"onClientRender\", root, function()
local tick = getTickCount()
if tick-oldTick > 1000 then
local dim = getElementDimension(localPlayer)
local int = getElementInterior(localPlayer)
if dim ~= oldDim or int ~= oldInt then
oldDim = dim
oldInt = int
moveMap(\"resourceneve\")
end
end
end)
function moveMap(resName)
for k, v in ipairs(getElementsByType(\"object\", getResourceRootElement(getResourceFromName(resName)))) do
setElementInterior(v, oldInt)
setElementDimension(v, oldDim)
end
end
óh :3 Nagyon szépen köszönöm :)