Jump to content

Block camera


OnlineCheater

Recommended Posts

Hey all,

I just want to save a camera target when I die whilte I'm in a vehicle and then even if the vehicle moves, the camera keeps motionless thanks to the camera saved when the player died.

Could you please tell me how I can do this?

I have no idea how to save the coordonates of the camera when the player dies...

addEventHandler("onClientPlayerWasted",root, 
function() ........ end) 

Link to comment
addEventHandler("onClientPlayerWasted", localPlayer, 
function() 
    setCameraMatrix(unpack({getCameraMatrix()})) 
end) 

I'm not quite sure but this can also be done without the unpack. If I'm not mistaken, the function getCameraMatrix returns a total of 8 parameters which are enough and actually correctly used in setCameraMatrix. If you want to save your head from clusterf*cks, you can try it by simply doing;

setCameraMatrix ( getCameraMatrix() ) 

That might even save a little tiny bit of cpu usage too.

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