forward OnPlayerCameraFinish(playerid); // Callback, calls when the movement has complete.
forward DestroyCameraForPlayer(playerid); // Destroys the camera before a cycle has finished.
forward UpdatePlayerCameraPosition(playerid); // Include only function, no use to scripter.
forward LastCameraPos(playerid, &Float:x, &Float:y, &Float:z); // Returns the last finished movement cam position.
SetCameraPosForPlayer(playerid, Float:startx, Float:starty, Float:startz, Float:endx, Float:endy, Float:endz, Float:speed, bool:sync_surroundings=false, bool:rand_vw=false); // sync_surroundings means it'll set the player near the camera but out of view so everything surrounding loads in high detail, rand_vw if true puts them in a random virtual world until the cycle is complete otherwise players will see the player floating randomly to the camera position.
SetCameraPosForPlayer(playerid, 1812.8744,-1853.0919,13.4141, 1812.4706,-1857.3477,13.4141, 5.0, true);
public OnPlayerCameraFinish(playerid) {
new Float:x, Float:y, Float:z;
switch(S_CAMERA[playerid]) {
case 0: {
LastCameraPos(playerid, x, y, z);
SetCameraPosForPlayer(playerid, x, y, z, 1726.2292,-1857.5374,13.4141, 5.0, true), S_CAMERA[playerid]++;
}
case 1: {
LastCameraPos(playerid, x, y, z);
SetCameraPosForPlayer(playerid, x, y, z, 1726.1542,-1852.1835,13.4141, 5.0, true), S_CAMERA[playerid]++;
}
case 2: {
LastCameraPos(playerid, x, y, z);
SetCameraPosForPlayer(playerid, x, y, z, 1812.8744,-1853.0919,13.4141, 5.0, true), S_CAMERA[playerid]++;
}
case 3: {
LastCameraPos(playerid, x, y, z);
SetCameraPosForPlayer(playerid, x, y, z, 1812.4706,-1857.3477,13.4141, 5.0, true), S_CAMERA[playerid] = 0;
}
}
return true;
}
Cool! FireCat's Real name is james !
10/10 for the script! Good job norm! or corn or whatever it is.. |
Good job, I often find lot of people stuck with getting a system similar to work smooth.
|