Jump to content

Please help me


khalid-mks

Recommended Posts

This script is a INTRO .. camera moves from one place to another

My problem with this script

Does not want to engage in I do not know what the problem

I hope that you will help me in the nearest time

And tell me what is the solution

Can you tell me if the script is true or not

I hope that you will help me

_____________________

Who has something similar

Ask him to give it to me

In contrast, pay him money :|

_____________________

local sm = {} 
sm.moov = 0 
sm.object1, sm.object2 = nil, nil 
  
function removeCamHandler () 
    if(sm.moov == 1) then 
        sm.moov = 0 
        removeEventHandler ( "onClientPreRender", getRootElement(), camRender ) 
    end 
end 
  
function camRender () 
    local x1, y1, z1 = getElementPosition ( sm.object1 ) 
    local x2, y2, z2 = getElementPosition ( sm.object2 ) 
    setCameraMatrix ( x1, y1, z1, x2, y2, z2 ) 
end 
  
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" ) 
  
    addEventHandler ( "onClientPreRender", getRootElement(), camRender ) 
    sm.moov = 1 
    setTimer ( removeCamHandler, time, 1 ) 
    setTimer ( destroyElement, time, 1, sm.object1 ) 
    setTimer ( destroyElement, time, 1, sm.object2 ) 
    return true 
end 
  
addCommandHandler ( "camera", 
    function ( ) 
        smoothMoveCamera ( 2317.369140625, 687.4677734375, 59.040821075439, 2407.83984375, 569.1337890625, 40.787521362305, 2227.458984375, 598.650390625, 29.868627548218, 2298.16015625, 572.3984375, 28.285842895508, 5000 ) 
    end 
) 

I hope you understand my English language :|

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