are nice and usefull. But if you add them instead of old SetCameraPos and SetCameraLookAt in OnPlayerRequestClass camera moves from one place to another each time you switch class, but many people want camera to move to request class place one time and not to move when you choose class. I found a decicion:
PHP код:
new isreq[MAX_PLAYERS];
forward isreqtimer(playerid);
public OnPlayerRequestClass(playerid, classid)
{
if(isreq[playerid] == 0)
{
InterpolateCameraPos(playerid, 2362.0256, -2658.9897, 101.2032, 2108.0005, -2411.1997, 16.3132, 1500, CAMERA_MOVE);
InterpolateCameraLookAt(playerid, 2042.0256, -2595.9897, 60.2032, 2107.0256, -2410.9897, 16.2032, 2000, CAMERA_MOVE);
SetPlayerTimer("isreqtimer", 10, 0);
}
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
isreq[playerid] = 0;
return 1;
}