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, "i", playerid);
return 1;
}
public BaySideCameras(playerid)
{
new 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 if(camera == 6) {
camera = 0;
}
}
What's wrong? |
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;
}
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
}
I go to the request class screen and the camera still doesn't change.
|
I have no classes, I don't want them to be able to pick their class.
|