This will switch your camera location from place to place while the person is either logining in or registering.
Код:
new Testing[MAX_PLAYERS];
public OnPlayerRequestClass(playerid, classid)
{
Testing[playerid] = 1;
if(Testing[playerid] == 1)
{
TogglePlayerSpectating(playerid, 1);
InterpolateCameraPos(playerid, 0.0, 0.0, 10.0, 1000.0, 1000.0, 30.0, 10000, CAMERA_MOVE);
InterpolateCameraLookAt(playerid, 50.0, 50.0, 10.0, -50.0, 50.0, 10.0, 10000, CAMERA_MOVE);
SetTimerEx("NextStep1", 5000, false, "i", playerid);
}
else if(Testing[playerid] == !1) return 1;
return 1;
}
forward NextStep1(playerid);
public NextStep1(playerid)
{
InterpolateCameraPos(playerid, 0.0, 0.0, 10.0, 1000.0, 1000.0, 30.0, 10000, CAMERA_MOVE);
InterpolateCameraLookAt(playerid, 50.0, 50.0, 10.0, -50.0, 50.0, 10.0, 10000, CAMERA_MOVE);
SetTimerEx("NextStep2", 5000, false, "i", playerid);
}
forward NextStep2(playerid);
public NextStep2(playerid)
{
InterpolateCameraPos(playerid, 0.0, 0.0, 10.0, 1000.0, 1000.0, 30.0, 10000, CAMERA_MOVE);
InterpolateCameraLookAt(playerid, 50.0, 50.0, 10.0, -50.0, 50.0, 10.0, 10000, CAMERA_MOVE);
Testing[playerid] = 0;
}