Jump to content

[AYUDA]Camara con movimiento


iSmokee

Recommended Posts

Encontré esto en un login que esta en la comunidad quería saber si me podrían explicar como usarlo gracias.

marker1 = createMarker( -2664.75, 1335.49609375, 55.8125,"corona",1,0,0,0,0)
cameraPosition = createObject(8558, -2661.1669921875, 1188.537109375, 66.426193237305,0,0,0,true)
x1,y1,z1=-1661.1669921875, 1188.537109375, 66.426193237305
x2,y2,z2=-2661.1669921875, 1188.537109375, 66.426193237305
x3,y3,z3=-2661.1669921875, 1188.537109375, 66.426193237305
outputEditTimeBox=100000
outputEditTimeBox2=100
setElementAlpha(cameraPosition,0)

function stopCamera1()
removeEventHandler("onClientHUDRender", getRootElement(),cameraSettenMetTarget)
removeEventHandler("onClientHUDRender", getRootElement(),cameraSettenMetTarget2)
showPlayerHudComponent ( "radar", true )
end

function moveCameraWithTarget ()
setElementPosition(cameraPosition,x1,y1,z1)
checkMovement=moveObject(cameraPosition,outputEditTimeBox,x2,y2,z2)
if not checkMovement then
outputChatBox("Iets failt hem, check je invuldinges")
end

function moveCameraWithTarget2 ()
setElementPosition(cameraPosition,x2,y2,z2)
checkMovement=moveObject(cameraPosition,outputEditTimeBox2,x3,y3,z3)
if not checkMovement then
outputChatBox("Iets failt hem, check je invuldinges")
end
addEventHandler("onClientHUDRender", getRootElement(),cameraSettenMetTarget2)
timer2 = setTimer(stopCamera1, outputEditTimeBox2, 1)
cameraMode = 1
showPlayerHudComponent ( "radar", false )
end

addEventHandler("onClientHUDRender", getRootElement(),cameraSettenMetTarget)
cameraMode = 1
showPlayerHudComponent ( "radar", false )
end

function cameraSettenMetTarget()
x4,y4,z4 = getElementPosition(cameraPosition)
x5,y5,z5 = getElementPosition(marker1)
setCameraMatrix(x4,y4,z4,x5,y5,z5)
end

function cameraSettenMetTarget2()
x4,y4,z4 = getElementPosition(cameraPosition)
x5,y5,z5 = getElementPosition(marker1)
setCameraMatrix(x4,y4,z4,x5,y5,z5)
end

addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),moveCameraWithTarget)

 

Link to comment
  • Recently Browsing   0 members

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