InterpolateCameraPos
#1

I have the following code, but it's not working when I do /preview.

pawn Код:
new Float:StartX, Float:StartY, Float:StartZ, Float:EndX, Float:EndY, Float:EndZ;

command(preview, playerid, params[])
{
    TogglePlayerSpectating(playerid, true);
    InterpolateCameraPos(playerid, StartX, StartY, StartZ, EndX, EndY, EndZ, 3);
    return 1;
}

command(start, playerid, params[])
{
    GetPlayerCameraPos(playerid, StartX, StartY, StartZ);
    return 1;
}

command(stop, playerid, params[])
{
    GetPlayerCameraPos(playerid, EndX, EndY, EndZ);
    return 1;
}
I make sure I have /start and /stop done before I do anything, but it doesn't do anything.
Reply
#2

pawn Код:
InterpolateCameraPos(playerid, StartX, StartY, StartZ, EndX, EndY, EndZ, 3000, CAMERA_MOVE);
You need to make sure of the following:
- You are using /start and /stop before using /preview.
- /start and /stop are not in the same position.
- You are spawned before using /start and /stop.
- Nobody else has used either /start or /stop before you use /preview.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)