abo_7mod Posted July 9, 2015 Share Posted July 9, 2015 السلام عليكم اخباركم بديث اسوي قيم مود خطوة بخطوة سويت التسجيل وكل شيء تمام الحين الي اطلبه هو : كيف اخلي الكاميرا تتحرك من مكان الى اخر يعني الكاميرا تكون من مكان معين تتحرك الى مكان آخر انا احدده وش الفنكشن لو سمحتم Link to comment
Mr.R Posted July 9, 2015 Share Posted July 9, 2015 Event : "onClientPreRender" setCameraMatrix وعشان تجيب احداثيات الكاميرا استخدم كود زاحف addCommandHandler ( "GetCameraPos", function ( ) local x, y, z, xl, yl, zl = getCameraMatrix ( ) if ( x == 0 or y == 0 or z == 0 ) then return end setClipboard ( " "..x..", "..y..", "..z..", "..xl..", "..yl..", "..zl.." " ) end ) GetCameraPos اكتب باف8 وبعدين بتنسخ تلقائيا الي عليك تلصقها بس Link to comment
abo_7mod Posted July 9, 2015 Author Share Posted July 9, 2015 This function sets the camera's position and direction. The first three arguments are the point at which the camera lies, the last three are the point the camera faces (or the point it "looks at"). ما فهمتني الي ابيه ان الكاميرا تتحرك من مكان لآخر يعني من الدائري للنخيل تتحرك الكاميرا Link to comment
#|_oskar_|# Posted July 9, 2015 Share Posted July 9, 2015 https://wiki.multitheftauto.com/wiki/SmoothMoveCamera Link to comment
abo_7mod Posted July 9, 2015 Author Share Posted July 9, 2015 كيف استخدمه هذا ؟ حطيت الكود فوق بعدين حطيت smoothMoveCamera والاحداثيات ما نفع معي ليش Link to comment
abo_7mod Posted July 9, 2015 Author Share Posted July 9, 2015 addEvent ( "open", true ) addEventHandler ( "open", root, function ( ) showCursor(true) showChat(false) guiSetVisible (window, true ) smoothMoveCamera(2873.0734863281,-1569.1434326172,23.09375,2921.4440917969,-1430.3763427734,18.875,2855.6694335938,-1532.2794189453,12.09375,2852.8605957031,-1532.5329589844,11.09375,2000) end ) Link to comment
iMr.Dawix~# Posted July 9, 2015 Share Posted July 9, 2015 addEvent ( "open", true ) addEventHandler ( "open", root, function ( ) showCursor(true) showChat(false) guiSetVisible (window, true ) smoothMoveCamera(2873.0734863281,-1569.1434326172,23.09375,2921.4440917969,-1430.3763427734,18.875,2855.6694335938,-1532.2794189453,12.09375,2852.8605957031,-1532.5329589844,11.09375,2000) end ) 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 addEvent ( "open", true ) addEventHandler ( "open", root, function ( ) showCursor(true) showChat(false) guiSetVisible (window, true ) smoothMoveCamera(2873.0734863281,-1569.1434326172,23.09375,2921.4440917969,-1430.3763427734,18.875,2855.6694335938,-1532.2794189453,12.09375,2852.8605957031,-1532.5329589844,11.09375,2000) end ) Link to comment
abo_7mod Posted July 9, 2015 Author Share Posted July 9, 2015 الكود ضفته من قبل وتمام شغآل لكن يوم ينتهي الحدث الكاميرا تيظل في نفس مكانها كيف اشيلها واخلي الاعب يبدأ باللعب Link to comment
abo_7mod Posted July 9, 2015 Author Share Posted July 9, 2015 تمت الافادة شكرا احبابي اي استفسار بسأله هنا احسن من اني افتح موضوع جديد Link to comment
Mr.R Posted July 9, 2015 Share Posted July 9, 2015 تمت الافادة شكرا احبابياي استفسار بسأله هنا احسن من اني افتح موضوع جديد حياكـ الله Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now