19.12.2010, 11:42
Quote:
What's wrong? |
And in your timer you named it as 'BaysideCameras' ('s' instead of 'S');
2) Your 'BaySideCameras' doesn't return any value;
3) You set your timer only once;
Let's add a second argument 'camera' to the 'BaysideCameras' , so OnPlayerRequestClass will looks like this
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, -2829.4509,2601.7959,160.1133);
TogglePlayerControllable(playerid, 0);
SetPlayerCameraLookAt(playerid,-2482.0869,2384.7859,13.3606);
SetPlayerCameraPos(playerid,-2287.3457,2080.9849,10.2316);
SetTimerEx("BaySideCameras", 1500, 0, "ii", playerid,0);//camera = 0
return 1;
}
pawn Код:
public BaySideCameras(playerid,camera)
{
switch(camera)
{
case 0: SetPlayerCameraPos(playerid,-2287.3457,2080.9849,10.2316);
case 1: SetPlayerCameraPos(playerid,-2222.0532,2169.4048,58.7913);
case 2: SetPlayerCameraPos(playerid,-2186.5342,2428.9966,58.7913);
case 3: SetPlayerCameraPos(playerid,-2350.1245,2559.9856,58.7913);
case 4: SetPlayerCameraPos(playerid,-2604.7361,2597.5889,91.1503);
case 5: SetPlayerCameraPos(playerid,-2741.2986,2435.5330,91.4912);
case 6: SetPlayerCameraPos(playerid,-2663.8237,2143.5085,72.0710);
}
if(camera < 6)
camera++;
else
camera = 0;
SetTimerEx("BaySideCameras", 1500, 0, "ii", playerid,camera);//Let's set our timer again, but with new camera
return 1;//should return a value
}