Jump to content

help plis move camera


Jacobob14

Recommended Posts

I'm trying to make a move with the camera but it does not work help please

function moveCameraTo( class, skin ) 
      local x, y, z, lx, ly, lz = getCameraMatrix () 
    local camX, camY, camZ = class.cameraMngr.pos.x, class.cameraMngr.pos.y, class.cameraMngr.pos.z; 
    local lookAtX, lookAtY, lookAtZ = class.cameraMngr.lookAt.x, class.cameraMngr.lookAt.y, class.cameraMngr.lookAt.z; 
    local posx, posy, posz = interpolateBetween (x, y, z, camX, camY, camZ, 2000, "OutBounce" ) 
    setCameraMatrix(posx, posy, posz,posx, posy, posz) 
    if x == camX and y == camY and z == camZ then 
    teleportTempPed( skin ) 
    end 
end 

Link to comment

this the spawn of 50p

I'm trying to make when choosing a camera shake spawn

function classSelected ( ) 
    selectedRow = gridList:SelectedItem( ); 
  
    if selectedRow ~= -1 then 
        local data = split( gridList:ItemData( selectedRow, 1 ), string.byte(',') ); 
        local classIndex = tonumber( data[ 1 ] ); 
        local skinIndex = tonumber( data[ 2 ] ); 
        local class = classGroups[ selectedGroup + 1 ].classes[ classIndex ]; 
        local skin = classGroups[ selectedGroup + 1 ].classes[ classIndex ].skinMngr.skins[ skinIndex ]; 
        start = getTickCount() 
            addEventHandler ( "onClientRender", getRootElement(),  moveCameraTo(class, skin ) ) 
        if previousClass ~= classIndex then 
            resizeWeaponsWnd( class.weaponMngr ); 
        else 
            teleportTempPed( skin ); 
        end 
        previousClass = classIndex; 
         
        local classDescr = class.info; 
        if classDescr then 
            descrLabel:Text( classDescr ); 
            info = classDescr 
            descrGridList:Visible( true ); 
        else 
            descrGridList:Visible( false ); 
            weaponsGrid:Visible( false ); 
        end 
    else 
        descrGridList:Visible( false ); 
        weaponsGrid:Visible( false ); 
    end 
end 
function moveCameraTo( class, skin ) 
     
    local x, y, z, lx, ly, lz = getCameraMatrix () 
    local camX, camY, camZ = class.cameraMngr.pos.x, class.cameraMngr.pos.y, class.cameraMngr.pos.z; 
    local lookAtX, lookAtY, lookAtZ = class.cameraMngr.lookAt.x, class.cameraMngr.lookAt.y, class.cameraMngr.lookAt.z; 
    local camerax, cameray, cameraz = interpolateBetween (x, y, z, camX, camY, camZ, 2000, "OutBounce" ) 
    setCameraMatrix(camerax, cameray, cameraz, camerax, cameray, cameraz ) 
    if x == camX and y == camY and z == camZ then 
    teleportTempPed( skin ) 
    end 
end 

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