Jump to content

[HELP] Camera moving from one point to another


Dziugasc

Recommended Posts

Hello, I want to make camera animation when player dies, he respawns and camera starts above him.

I tried using this code:

function deathcinema()
local x1,y1,z1 = getElementPosition( LocalPlayer )
local smoothMoveCamera ( x1, y1+10, z1, x1, y1, z1, x1, y1, z1, x1+5, x1, z1, 20000 )
end  
addCommandHandler("test", deathcinema) 

but nothing happens if I type command "test", and then when I use addEventHandler with OnPlayerWasted and it acts same.

Link to comment
  • Moderators

smoothMoveCamera function is not exists in MTA.
This is an useful function what you can find on MTA Wiki: https://wiki.multitheftauto.com/wiki/SmoothMoveCamera
You have to paste function's source code into your script before use it.

And there are 2 other problems in your code:
LocalPlayer is not exists in 2nd line, use localPlayer instead.
- local before smoothMoveCamera is incorrect in 3rd line, just remove it.

Edited by Patrick
  • Thanks 1
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...