Jump to content

ممكن مساعده سريعه من اي شخص محترف في اصلاح هذا الكود


Recommended Posts

السلام عليكم ورحمة الله وبركاته

يا اخوان محتاج مساعده

في اصلاح الكود ذا

الكود ذا يروح من ثاني احداثيات ما يبداء بالاولى

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 
----------------- 
function mainFunction() 
    setTimer ( function() 
        smoothMoveCamera ( 2882, 1790, 31, 2899, 1789, 28, 2897, 1794, 28, 2884, 1785, 28, 3000) 
    end, 3000, 30 ) 
end 
  
  
    setTimer ( function() 
        smoothMoveCamera ( 2899, 1789, 28, 2882, 1790, 31, 2897, 1794, 28, 2884, 1785, 28, 2000) 
    end, 3000, 30 ) 
  
mainFunction() 
  
  
  

وياريت اي احد يساعني

انا قسم ما الزق بالمحترفين بس يجيني كم وقت استصعب باشياء

احتاج مساعده

وشكراً لكم

+

ورمضان كريم

Link to comment
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 
----------------- 
function mainFunction(fo) 
    setTimer ( function(fo) 
        smoothMoveCamera ( 2882, 1790, 31, 2899, 1789, 28, 2897, 1794, 28, 2884, 1785, 28, 3000) 
    end, 3000, 30 ) 
  
  
if fo then 
  
    setTimer ( function() 
        smoothMoveCamera ( 2899, 1789, 28, 2882, 1790, 31, 2897, 1794, 28, 2884, 1785, 28, 2000) 
    end, 100, 30 ) 
end 
end 
     
mainFunction() 
  
  

الحين مع التعديله ذي الثاني ما يشتغل

اي حد يعرف الخطاء ياريت يرد

Link to comment
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 
  
  
  
    setTimer ( function() 
        smoothMoveCamera ( 2899, 1789, 28, 2882, 1790, 31, 2897, 1794, 28, 2884, 1785, 28, 2000) 
    end, 3000, 30 ) 
  
  
    setTimer ( function() 
        smoothMoveCamera ( 2882, 1790, 31, 2899, 1789, 28, 2897, 1794, 28, 2884, 1785, 28, 3000) 
    end, 3000, 30 ) 
  
  
  

Link to comment
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 
  
  
  
    setTimer ( function() 
        smoothMoveCamera ( 2899, 1789, 28, 2882, 1790, 31, 2897, 1794, 28, 2884, 1785, 28, 2000) 
    end, 3000, 30 ) 
  
  
    setTimer ( function() 
        smoothMoveCamera ( 2882, 1790, 31, 2899, 1789, 28, 2897, 1794, 28, 2884, 1785, 28, 3000) 
    end, 3000, 30 ) 
  
  
  

الثانيه وبس تشتغل

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...