MadMaximus Posted February 2, 2017 Share Posted February 2, 2017 So guys is there anyway to change the camera view in a map in client side? If so can someone provide me a script which can change the camera view but still follow and target the player so I can change coordinates and use as I want. Or can someone tell me how to script it. Link to comment
MadMaximus Posted February 4, 2017 Author Share Posted February 4, 2017 On 2/2/2017 at 12:03, idarrr said: setCameraMatrix Yes I know I can set camera position using setCameraMatrix. But what I don't know is how to write the full script. I'm really new to lua. Link to comment
Yazir Posted February 4, 2017 Share Posted February 4, 2017 https://wiki.multitheftauto.com/wiki/Scripting_Introduction I can help you with an example of that camera, but tell me what is it supposed to first. 1 Link to comment
MadMaximus Posted February 4, 2017 Author Share Posted February 4, 2017 1 hour ago, Yazir said: https://wiki.multitheftauto.com/wiki/Scripting_Introduction I can help you with an example of that camera, but tell me what is it supposed to first. I wanna make a map which doesn't have the mouse control on camera. It should stick to a specific angle but it should still follow the player. Something like in a 2d game. Link to comment
Yazir Posted February 4, 2017 Share Posted February 4, 2017 function onClientRender( ) local x,y,z = getElementPosition( localPlayer ) setCameraMatrix(x, y + 20, z + 2, x, y, z) end addEventHandler( "onClientRender", root, onClientRender ) 1 Link to comment
MadMaximus Posted February 4, 2017 Author Share Posted February 4, 2017 12 hours ago, Yazir said: function onClientRender( ) local x,y,z = getElementPosition( localPlayer ) setCameraMatrix(x, y + 20, z + 2, x, y, z) end addEventHandler( "onClientRender", root, onClientRender ) Thank you so much. It works perfectly... <3 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