local sm = {}
sm.moov = 0
sm.object1,sm.object2 = nil,nil
local function removeCamHandler()
if(sm.moov == 1)then
sm.moov = 0
end
end
local function camRender()
if (sm.moov == 1) then
local x1,y1,z1 = getElementPosition(sm.object1)
local x2,y2,z2 = getElementPosition(sm.object2)
setCameraMatrix(x1,y1,z1,x2,y2,z2)
end
end
addEventHandler("onClientPreRender",root,camRender)
function smoothMoveCamera(x1,y1,z1,x1t,y1t,z1t,x2,y2,z2,x2t,y2t,z2t,time)
if(sm.moov == 1)then return false end
sm.object1 = createObject(1337,x1,y1,z1)
sm.object2 = createObject(1337,x1t,y1t,z1t)
setElementAlpha(sm.object1,0)
setElementAlpha(sm.object2,0)
setObjectScale(sm.object1,0.01)
setObjectScale(sm.object2,0.01)
moveObject(sm.object1,time,x2,y2,z2,0,0,0,"InOutQuad")
moveObject(sm.object2,time,x2t,y2t,z2t,0,0,0,"InOutQuad")
sm.moov = 1
setTimer(removeCamHandler,time,1)
setTimer(destroyElement,time,1,sm.object1)
setTimer(destroyElement,time,1,sm.object2)
return true
end
addEventHandler("onClientResourceStart", resourceRoot,
function( )
smoothMoveCamera ( 2924.0993652344, 2300.0993652344, 69.69255065918, 2800.7707519531, 2207.8989257813, 59.528423309326, 2366.2189941406, 1803.0053710938, 80.883728027344, 2575.2028808594, 1528.8845214844, 18.751119613647, 15000 )
end
)
شوف ,
سوي ملف جديد > كلنت < ء
وحط فيه الكود الي فوق
وسوي ميتا وضبطها
وجرب المود
الاحداثيات هذي
smoothMoveCamera ( X1, Y1, Z1, X2, Y2, Z2, X3, Y3, Z3, X4, Y4, Z4, time)
X1 = احداثيات بداية الكاميرا X
Y1 = احداثيات بداية الكاميرا Y
Z1 = احدثيات بداية الكاميرا Z
X2 = احداثيات المكان الي الكاميرا تكون موجهه له X2
Y2 = Y2 ^
Z2 = Z2 ^
X3 = نهاية المكان الي تكون الكاميرا ثابته فيه X3
Y3 = Y3 ^
Z3 = Z3 ^
X4 = احداثيات المكان الي تكون الكاميرا في الاخير موجهه له X4
Y4 = Y4 ^
Z4 = Z4 ^
time = سرعة الكاميرا , الافضل تحطها 15000
استبدلها بإحداثياتك او المكان الي انت فيه
او بطريقة اسهل عبر الماب ايديتور
وشغل الفري روم
وروح زر
Map
اذا كان الفري روم الاصلي
وتحصل احداثياتك تحت الخريطه
X , Y , Z
وشوف الويكي شرحه افضل