// -------------------------------// Mozgó kamera a karakterválasztóban// Készítette GameStar// www.gtaforum.hu// 2012// -------------------------------#include <a_samp>#if !defined InterpolateCameraPos#error \"A fordítód nem tartalmazza a 0.3e fájlokat!\"#endif#define CAMERA_TIME 8000forward CameraInterpolate(playerid);public OnPlayerConnect(playerid){ SetPVarInt(playerid, \"cameraInterpolate\", 0);SetPVarInt(playerid, \"skinTimer\", -1);return 1;}public OnPlayerRequestClass(playerid, classid){SetPlayerPos(playerid, 2232.7930,-2458.5513,61.6104);SetPlayerFacingAngle(playerid, 97.1613);if(GetPVarInt(playerid,\"skinTimer\") == -1){CameraInterpolate(playerid);SetPVarInt(playerid, \"skinTimer\", SetTimerEx(\"CameraInterpolate\", CAMERA_TIME + 225, 1, \"i\", playerid));}return 1;}public OnPlayerRequestSpawn(playerid){ KillTimer(GetPVarInt(playerid,\"skinTimer\"));SetPVarInt(playerid, \"skinTimer\", -1);SetCameraBehindPlayer(playerid);return 1;}public CameraInterpolate(playerid){ switch(GetPVarInt(playerid,\"cameraInterpolate\")){case 0:{ InterpolateCameraPos(playerid, 2228.596435, -2462.059082, 62.675743, 2226.085937, -2457.546875, 62.636756, CAMERA_TIME); InterpolateCameraLookAt(playerid, 2232.7930,-2458.5513,61.6104, 2232.7930,-2458.5513,61.6104, CAMERA_TIME);}case 1:{ InterpolateCameraPos(playerid, 2226.085937, -2457.546875, 62.636756, 2231.406250, -2456.153564, 61.862873, CAMERA_TIME); InterpolateCameraLookAt(playerid, 2232.7930,-2458.5513,61.6104, 2232.7930,-2458.5513,61.6104, CAMERA_TIME);}case 2:{ InterpolateCameraPos(playerid, 2231.406250, -2456.153564, 61.862873, 2228.596435, -2462.059082, 62.675743, CAMERA_TIME); InterpolateCameraLookAt(playerid, 2232.7930,-2458.5513,61.6104, 2232.7930,-2458.5513,61.6104, CAMERA_TIME);}}SetPVarInt(playerid, \"cameraInterpolate\", GetPVarInt(playerid,\"cameraInterpolate\") + 1);if(GetPVarInt(playerid,\"cameraInterpolate\") > 2) SetPVarInt(playerid, \"cameraInterpolate\", 0);return 1;}