local camerak = 3function cameravalto()local count = 3if (camerak == 3) then setCameraMatrix(1380.9006347656, -903.75323486328,60, 1412.3126220703, -807.5615234375, 55, -2, 85) setTimer(cameravalto, 1000, 1, camerak-1)elseif (camerak == 2) then setCameraMatrix(1380.9006347656, -903.75323486328,50, 1412.3126220703, -807.5615234375, 55, -5, 85) setTimer(cameravalto, 1000, 1, camerak-1)elseif (camerak == 1) then setCameraMatrix(1380.9006347656, -903.75323486328,25, 1412.3126220703, -807.5615234375, 55, -20, 85) setTimer(cameravalto, 1000, 1, camerak-1)elseif (camerak == 0) then setCameraMatrix(1380.9006347656, -903.75323486328,10, 1412.3126220703, -807.5615234375, 55, -2, 85) setTimer(cameravalto, 1000, 1, camerak+count)--elseif (camerak == false) then-- setCameraTarget(source)endend
function recursiveSetCamera(cameraId)if cameraId == 3 then setCameraMatrix(1380.9006347656, -903.75323486328,60, 1412.3126220703, -807.5615234375, 55, -2, 85)elseif cameraId == 2 then setCameraMatrix(1380.9006347656, -903.75323486328,50, 1412.3126220703, -807.5615234375, 55, -5, 85)elseif cameraId == 1 then setCameraMatrix(1380.9006347656, -903.75323486328,25, 1412.3126220703, -807.5615234375, 55, -20, 85)elseif cameraId == 0 then setCameraMatrix(1380.9006347656, -903.75323486328,10, 1412.3126220703, -807.5615234375, 55, -2, 85)else setCameraTarget(localPlayer)endif cameraId >= 0 then setTimer(recursiveSetCamera, 1000, 1, cameraId - 1)endend-- Használat: recursiveSetCamera(3) -- azaz a 3-as kamera Id-től fog indulni