Help Please with InterpolateCameraPos
#1

Basically what I need is when a player connects I want the camera to move. So should I do it in OnPlayerRequestClass OR SetTimerEx under OnPlayerConnect. I have tried it in many ways but it does not seem to work any help would be appreciated.
pawn Код:
InterpolateCameraPos(playerid, 2135.237792, 2489.806396, 104.410575, 2025.816650, 1668.265747, 24.090234, 100000,CAMERA_MOVE);
InterpolateCameraLookAt(playerid, 2135.196044, 2484.846923, 103.775894, 2020.999877, 1668.403564, 22.756238, 100000,CAMERA_MOVE);//This is in LV
Thanks for reading,
Kingofdemons.
Reply
#2

/Bump Does any one know?
Reply
#3

Make this.
On the top of your script put this variable and forward:
Код:
new camera[MAX_PLAYERS];
forward cameratimer(playerid);
In OnPlayerRequestClass put this (not in onplayerconnect)
Код:
if(camera[playerid] == 0)
    {
    SetTimerEx("cameratimer", 5000, false, "i", playerid); // --> it's 5 second, set the time what you want
    InterpolateCameraPos(playerid, 2135.237792, 2489.806396, 104.410575, 2025.816650, 1668.265747, 24.090234, 100000,CAMERA_MOVE);
    InterpolateCameraLookAt(playerid, 2135.196044, 2484.846923, 103.775894, 2020.999877, 1668.403564, 22.756238, 100000,CAMERA_MOVE);//This is in LV
    camera[playerid] = 1;
    }
In OnPlayerRequestSpawn put this
Код:
camera[playerid] = 0;
This, work with me. I hope I helped you
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)