Sziasztok. pl most beírom jelszót dialogban minden oké de lespawnol elkezdek menni valami járművel vagy akár gyalog sétálva akkor csak egyet gondol és elkezdi elindítani a 2. animációt de mivel ez már belépéskor végig ment akkor nem kéne hog elindljon .
Esetleg aki vágja az ilyen kamera állás dolgot az tudna valamit tippet adni teljesen tanács talan vagyok.
Előre is köszönöm
OnPlayerConnect
public OnPlayerConnect(playerid)
{
//kamera indul
TogglePlayerSpectating(playerid, 1);
StepSpawnPlayer[playerid] = 0;
Camera[playerid] = SetTimerEx(\"mozgokamera\", 1000, false, \"i\", playerid);
public OnPlayerSpawn(playerid)
{
KillTimer(Camera[playerid]);
SetCameraBehindPlayer(playerid);
public OnPlayerRequestClass(playerid, classid)
{
TogglePlayerSpectating(playerid, 0);
if(StepSpawnPlayer[playerid] == 1)
{
TogglePlayerControllable(playerid, true);
SetTimerEx(\"mozgokamera\", 5000-600, 0, \"id\", playerid, 1);
//SetCameraBehindPlayer(playerid);
KillTimer(Camera[playerid]);
return 0;
}
forward mozgokamera(playerid, type);
public mozgokamera(playerid, type)
{
//TogglePlayerSpectating(playerid, 1);
//SetCameraBehindPlayer(playerid);
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
switch(type)
{
case 0:
{
InterpolateCameraPos(playerid, 175.415924, -1875.955444, 25.157064, 973.770751, -1919.722534, 34.704750, 36000,CAMERA_MOVE); //36000
InterpolateCameraLookAt(playerid, 175.785186, -1871.220458, 23.593875, 973.699645, -1915.027587, 32.986591, 36000, CAMERA_MOVE);
SetTimerEx(\"mozgokamera\", 36000, 0, \"id\", playerid, 1);
//
}
case 1:
{
InterpolateCameraPos(playerid, 973.770629, -1919.722534, 34.704750, 973.770629, -1919.722534, 34.704750, 4000,CAMERA_MOVE);
InterpolateCameraLookAt(playerid, 973.750671, -1914.973266, 33.141559, 970.190795, -1922.789672, 33.038051, 4000, CAMERA_MOVE);
SetTimerEx(\"mozgokamera\", 4000, 0, \"id\", playerid,2);
TogglePlayerSpectating(playerid, 0);
/*}
case 2:
{
InterpolateCameraPos(playerid, 132.222778, -1990.696899, 130.671890, 344.082275, -2125.614746, 11.826739, 8000);
InterpolateCameraLookAt(playerid, 134.914337, -1990.562011, 126.460327, 347.755004, -2122.481445, 10.525499, 8000);
SetTimerEx(\"mozgokamera\", 8000-600, 0, \"id\", playerid, 3);
}
case 3:
{
InterpolateCameraPos(playerid, 344.082275, -2125.614746, 11.826739, 1011.901000, -2376.593994, 26.804319, 5000);
InterpolateCameraLookAt(playerid, 347.891998, -2122.574707, 10.711217, 1016.406860, -2375.272949, 25.086170, 5000);
SetTimerEx(\"mozgokamera\", 5000-600, 0, \"id\", playerid, 4);
}
case 4:
{
InterpolateCameraPos(playerid, 1011.901000, -2376.593994, 26.804319, 1012.322204, -2376.100585, 26.804319, 5000);
InterpolateCameraLookAt(playerid, 1016.406860, -2375.272949, 25.086170, 1008.886962, -2372.750976, 25.397790, 5000);
SetTimerEx(\"mozgokamera\", 5000-600, 0, \"id\", playerid, 5);
//return 0;
*/
//case 2:InterpolateCameraLookAt(playerid, x, y, z, ide X, ide Y, ide Z, 2900, CAMERA_MOVE),pos[playerid] = 0;
}
}
return 1;
}