Help, End "InterpolateCameraPos"
#1

Hello Everyone. I need your help, I use this cameditor filterscript to create cinematic shots for my upcoming SA:MP video. Long story short, I use a command to load the cinematic camera i.e "/a1cam". Everything works fine, its just that I don't know how to end it.

The shot is 5 seconds long (5000 M.seconds), I added SetCameraBehindPlayer(playerid); under the command, but that didn't fix it. So how do I reset the camera to the player after the cinematic shot is done?

Code:

if (strcmp("/a1cam", cmdtext, true, 10) == 0)
{
TogglePlayerSpectating(playerid, 1);
InterpolateCameraPos(playerid, -2256.687500, -1802.869628, 422.829467, -2235.892089, -1764.994384, 422.829467, 5000);
InterpolateCameraLookAt(playerid, -2258.667968, -1799.940795, 426.364990, -2239.415039, -1765.469116, 426.345611, 5000);
return 1;

Thanks!

Picture from the cinematic shot here:
Reply
#2

TogglePlayerSpectating(playerid, 0); then use the SetCameraBehindPlayer.
Reply
#3

Putting them in spectating mode will most likely require you to remove them from such:
pawn Код:
TogglePlayerSpectating(playerid, false);
Reply
#4

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
Putting them in spectating mode will most likely require you to remove them from such:
pawn Код:
TogglePlayerSpectating(playerid, false);
Like this?

if (strcmp("/a1cam", cmdtext, true, 10) == 0)
{
TogglePlayerSpectating(playerid, false);
SetCameraBehindPlayer(playerid);
InterpolateCameraPos(playerid, -2256.687500, -1802.869628, 422.829467, -2235.892089, -1764.994384, 422.829467, 5000);
InterpolateCameraLookAt(playerid, -2258.667968, -1799.940795, 426.364990, -2239.415039, -1765.469116, 426.345611, 5000);
return 1;
}
Reply
#5

No set a timer that will count 5000 mili seconds after the command is performed and then use what we have given to you.
Reply
#6

Quote:
Originally Posted by TheSkyBlueTeam
Посмотреть сообщение
Like this?

if (strcmp("/a1cam", cmdtext, true, 10) == 0)
{
TogglePlayerSpectating(playerid, false);
SetCameraBehindPlayer(playerid);
InterpolateCameraPos(playerid, -2256.687500, -1802.869628, 422.829467, -2235.892089, -1764.994384, 422.829467, 5000);
InterpolateCameraLookAt(playerid, -2258.667968, -1799.940795, 426.364990, -2239.415039, -1765.469116, 426.345611, 5000);
return 1;
}
No, when their camera finishes moving.
Reply
#7

Quote:
Originally Posted by DarkLored
Посмотреть сообщение
No set a timer that will count 5000 mili seconds after the command is performed and then use what we have given to you.
How do I write that code, im a noob as u can tell
Reply
#8

Here is a wiki link that explains how to use timers

https://sampwiki.blast.hk/wiki/SetTimerEx
Reply
#9

Quote:
Originally Posted by DarkLored
Посмотреть сообщение
Here is a wiki link that explains how to use timers

https://sampwiki.blast.hk/wiki/SetTimerEx
Thanks
Reply
#10

Quote:
Originally Posted by DarkLored
Посмотреть сообщение
Here is a wiki link that explains how to use timers

https://sampwiki.blast.hk/wiki/SetTimerEx
Nope, It didn't work.

if (strcmp("/a1cam", cmdtext, true, 10) == 0)
{
InterpolateCameraPos(playerid, -2256.687500, -1802.869628, 422.829467, -2235.892089, -1764.994384, 422.829467, 5000);
InterpolateCameraLookAt(playerid, -2258.667968, -1799.940795, 426.364990, -2239.415039, -1765.469116, 426.345611, 5000);
SetCameraBehindPlayer(playerid);
TogglePlayerSpectating(playerid, false);
SetTimerEx("CinematicTimer", 5000, false,"i",playerid);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)