likemike12 Posted May 16, 2016 Share Posted May 16, 2016 السلام عليكم ورحمة الله وبركاته يا اخوان محتاج مساعده بجعل الكاميرا تتحرك محتاجها تتحرك عند اختيار الشخصيه تصير تلف حوالان الشخصيه محاولتي الفاشله local selectPed = createPed(287, 2892.9643554688, 1790.7238769531, 30.284019470215,90) smoothMoveCamera(2884.3356933594,1793.1822509766,28.638404846191,2901.93359375,1789.3258056641,28.260992050171,2884.3356933594,1793.1822509766,28.638404846191,2901.93359375,1789.3258056641,28.260992050171,2000) setTimer(function() if getElementModel(selectPed) == 283 then idSkin = 4 elseif getElementModel(selectPed) == 285 then idSkin = 3 elseif getElementModel(selectPed) == 282 then idSkin = 2 elseif getElementModel(selectPed) == 287 then idSkin = 1 end end,100,1) Link to comment
Walid Posted May 16, 2016 Share Posted May 16, 2016 (edited) Try this local facing = 0 local selectPed = createPed(287, 2892.9643554688, 1790.7238769531, 30.284019470215,90) function rotateCameraAroundPed( ) if selectPed then local x, y, z = getElementPosition(selectPed) local cameraX = x + math.cos( facing / math.pi * 180 ) * 5 local cameraY = y + math.sin( facing / math.pi * 180 ) * 5 setCameraMatrix(cameraX,cameraY, z, x, y, z ) facing = facing + 0.00009 end end addEventHandler( "onClientRender",root,rotateCameraAroundPed) Edited May 17, 2016 by Guest Link to comment
3NAD Posted May 16, 2016 Share Posted May 16, 2016 Try this local facing = 0 local selectPed = createPed(287, 2892.9643554688, 1790.7238769531, 30.284019470215,90) function rotateCameraAroundPed( ) if selectedPed then local x, y, z = getElementPosition(selectPed) local cameraX = x + math.cos( facing / math.pi * 180 ) * 5 local cameraY = y + math.sin( facing / math.pi * 180 ) * 5 setCameraMatrix(cameraX,cameraY, z, x, y, z ) facing = facing + 0.00009 end end addEventHandler( "onClientRender",root,rotateCameraAroundPlayer) الكود صحيح لكن التعاريف غير صحيحة selectedPed = ? rotateCameraAroundPlayer = ? Link to comment
likemike12 Posted May 17, 2016 Author Share Posted May 17, 2016 Try this local facing = 0 local selectPed = createPed(287, 2892.9643554688, 1790.7238769531, 30.284019470215,90) function rotateCameraAroundPed( ) if selectedPed then local x, y, z = getElementPosition(selectPed) local cameraX = x + math.cos( facing / math.pi * 180 ) * 5 local cameraY = y + math.sin( facing / math.pi * 180 ) * 5 setCameraMatrix(cameraX,cameraY, z, x, y, z ) facing = facing + 0.00009 end end addEventHandler( "onClientRender",root,rotateCameraAroundPlayer) الكود صحيح لكن التعاريف غير صحيحة selectedPed = ? rotateCameraAroundPlayer = ? هذا مش صحيح الصحيح بالكود الثاني Link to comment
3NAD Posted May 17, 2016 Share Posted May 17, 2016 الكود صحيح لكن التعاريف غير صحيحة selectedPed = ? rotateCameraAroundPlayer = ? هذا مش صحيح الصحيح بالكود الثاني تم تجربة الكود, انت وش تبي توصل له ؟ 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