Jacobob14 Posted January 11, 2015 Share Posted January 11, 2015 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
Noki Posted January 11, 2015 Share Posted January 11, 2015 Is this the whole script? Because I think there is more. Post the rest and we'll be able to help you. Link to comment
Jacobob14 Posted January 11, 2015 Author Share Posted January 11, 2015 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
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