Jump to content

Block camera


OnlineCheater

Recommended Posts

Posted

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) 

My nickname ingame: B#Crackz~

Do NOT ask me for help via PM about anything related to scripting. There are forums for that.

Posted
addEventHandler("onClientPlayerWasted", localPlayer, 
function() 
    setCameraMatrix(unpack({getCameraMatrix()})) 
end) 

CiTLh.png
Posted
addEventHandler("onClientPlayerWasted", localPlayer, 
function() 
    setCameraMatrix(unpack({getCameraMatrix()})) 
end) 

Gonna test it, thank you TAPL!

My nickname ingame: B#Crackz~

Do NOT ask me for help via PM about anything related to scripting. There are forums for that.

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

logo-small.png?v=3 tiny-sapdfr.png

 

If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]

Posted

Works perfectly, thank you TAPL!

I had already tried this way before tosfera but it didn't worked, thank you anyway ;)

My nickname ingame: B#Crackz~

Do NOT ask me for help via PM about anything related to scripting. There are forums for that.

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