Jump to content

كود smoothMoveCamera خشو


Recommended Posts

سلام عليكم

كيف اخلي فنكشن

smoothMoveCamera

يضل يلف

سويت له تايمر ما زبط

    setTimer ( function() 
    CamSpawn = smoothMoveCamera (2235.99365,1673.45593,1009.05938,2235.99365,1673.45593,1009.05938,2235.99365,1678.45593,1008.35938,2235.99365,1673.45593,1009.05938,2235.99365,1673.45593,1009.05938,2235.99365,1678.45593,1008.35938) 
    end, 500, 1 ) 

Edited by Guest
Link to comment

ايش المشكلة بالظبط ايش يطلع بالدي بق + ليش تسوي تايمر للفنكشن ؟ و اصلا نفس الكود لازم تحط فيه مدة معينه عشان تمشي الكام فيها ؟

Syntax شوف

bool smoothMoveCamera ( float x1, float y1, float z1, float x1t, float y1t, float z1t, float x2, float y2, float z2, float x2t, float y2t, float z2t, int time ) 
x1, y1, z1: The camera's start position. 
x1t, y1t, z1t: The camera's start look at. 
x2, y2, z2: The camera's end position. 
x2t, y2t, z2t: The camera's end look at. 
time: The speed of the camera's movement. 
  
 

Link to comment
ايش المشكلة بالظبط ايش يطلع بالدي بق + ليش تسوي تايمر للفنكشن ؟ و اصلا نفس الكود لازم تحط فيه مدة معينه عشان تمشي الكام فيها ؟

Syntax شوف

bool smoothMoveCamera ( float x1, float y1, float z1, float x1t, float y1t, float z1t, float x2, float y2, float z2, float x2t, float y2t, float z2t, int time ) 
x1, y1, z1: The camera's start position. 
x1t, y1t, z1t: The camera's start look at. 
x2, y2, z2: The camera's end position. 
x2t, y2t, z2t: The camera's end look at. 
time: The speed of the camera's movement. 
  
  
 

حطيت التايم الي هو 500

ما زبط

    CamSpawn = smoothMoveCamera (2235.99365,1673.45593,1009.05938,2235.99365,1673.45593,1009.05938,2235.99365,1678.45593,1008.35938,2235.99365,1673.45593,1009.05938,2235.99365,1673.45593,1009.05938,2235.99365,1678.45593,1008.35938,500) 
  

Link to comment

 -- Client 
local x,z,y = -1352.3040771484,-294.80819702148,25.4375 
progss =  10000 -- سرعة الحركه 
function cam()  
  
if isTimer(progs) then 
local x,z,y = interpolateBetween(x,z,y,-1367.1254882813,-274.08654785156,25.4375,getTimerDetails(progs)/ progss,"SineCurve") 
setCameraMatrix (x,z,y,-1372.2154541016,-291.12350463867,25.4375) 
else  
progs = setTimer(function() 
end, 5000000, 1)  
end 
end 
addCommandHandler("showcam",function ()  
addEventHandler("onClientRender", root,cam) 
end) 
addCommandHandler("removecam",function ()  
setCameraTarget(getLocalPlayer()) 
removeEventHandler("onClientRender", root,cam) 
end) 

لاظهار الكاميرا اكتب ب اف 8 -- showcam

ولااخفائها اكتب -- removecam

Link to comment
 -- Client 
local x,z,y = -1352.3040771484,-294.80819702148,25.4375 
progss =  10000 -- سرعة الحركه 
function cam()  
  
if isTimer(progs) then 
local x,z,y = interpolateBetween(x,z,y,-1367.1254882813,-274.08654785156,25.4375,getTimerDetails(progs)/ progss,"SineCurve") 
setCameraMatrix (x,z,y,-1372.2154541016,-291.12350463867,25.4375) 
else  
progs = setTimer(function() 
end, 5000000, 1)  
end 
end 
addCommandHandler("showcam",function ()  
addEventHandler("onClientRender", root,cam) 
end) 
addCommandHandler("removecam",function ()  
setCameraTarget(getLocalPlayer()) 
removeEventHandler("onClientRender", root,cam) 
end) 

لاظهار الكاميرا اكتب ب اف 8 -- showcam

ولااخفائها اكتب -- removecam

انا ابي احطه ل اختيار الشخصيه يعني الكام تصير تروح

يسار و يمين و انا اختار ب الشخصيه

Link to comment
اانا ابي احطه ل اختيار الشخصيه يعني الكام تصير تروح

يسار و يمين و انا اختار ب الشخصيه

انت ماوضحت طلبك كويس قلت تبي الكاميرا تلف يمين ويسار

يب يمين و يسار و انا اختار ب الشخصيه

Link to comment
تفضل اخوى مثال بسيط
function cam1() 
setCameraMatrix (6,1841,55,7,1842,54.991939544678) 
end 
bindKey("arrow_l","down",cam1) 
function cam2() 
setCameraMatrix (-4,1917,35,-3,1917,34.991939544678) 
end 
bindKey("arrow_r","down",cam2) 
  

انا مسويه كذا اصلا بس الكام ما تتحرك

Link to comment
تفضل اخوى مثال بسيط
function cam1() 
setCameraMatrix (6,1841,55,7,1842,54.991939544678) 
end 
bindKey("arrow_l","down",cam1) 
function cam2() 
setCameraMatrix (-4,1917,35,-3,1917,34.991939544678) 
end 
bindKey("arrow_r","down",cam2) 
  

انا مسويه كذا اصلا بس الكام ما تتحرك

انت تبي بعد ماتسجل الكاميرا تتحرك وتتوجه ع الشخصيه ؟

Link to comment
تفضل اخوى مثال بسيط
function cam1() 
setCameraMatrix (6,1841,55,7,1842,54.991939544678) 
end 
bindKey("arrow_l","down",cam1) 
function cam2() 
setCameraMatrix (-4,1917,35,-3,1917,34.991939544678) 
end 
bindKey("arrow_r","down",cam2) 
  

انا مسويه كذا اصلا بس الكام ما تتحرك

انت تبي بعد ماتسجل الكاميرا تتحرك وتتوجه ع الشخصيه ؟

لا ما تتوجه لها الشخصيه تطلع بس الكام تصير تروح يسار و يمين

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...