new Float:camera[42][3] = { {-2343.1233,2332.7126,4.9844}, {-2342.2234,2518.0281,2.8143}, {-2356.7388,2539.7715,19.5486}, {-2499.4106,2605.7681,58.4691}, {180.7142,-1403.9919,46.2522}, {-2098.5769,-2774.9558,44.7372}, {-2694.3662,-253.4055,7.0078}, {-2690.0039,-253.4742,6.9909}, {-2851.4280,238.5864,11.2916}, {-2804.8254,545.0164,6.6052}, {-2870.0327,918.4926,44.1354}, {-2870.2593,910.3209,44.3906}, {-2854.2017,987.7276,42.0547}, {-2862.8813,1017.3004,38.2339},//fim playerposepose {-2346.1858,2335.1338,4.9844}, {-2343.9036,2513.8940,2.4296}, {-2355.7419,2537.8477,17.1334}, {-2500.2407,2602.7773,59.2098}, {181.4239,-1400.8236,46.6435}, {-2101.6453,-2775.3242,44.5348}, {-2694.6399,-256.8124,7.0516}, {-2686.0781,-252.6662,6.9380}, {-2851.5193,235.2050,11.6340}, {-2806.5613,549.4806,6.6835}, {-2871.9360,915.9246,44.3906}, {-2871.6521,914.0192,44.3906}, {-2850.9714,986.1791,42.4343}, {-2864.8843,1019.8088,37.7624},// fim do lookat {-2343.1233,2332.7126,4.9844}, {-2342.2234,2518.0281,2.8143}, {-2356.7388,2539.7715,19.5486}, {-2499.4106,2605.7681,58.4691}, {180.7142,-1403.9919,46.2522}, {-2098.5769,-2774.9558,44.7372}, {-2694.3662,-253.4055,7.0078}, {-2690.0039,-253.4742,6.9909}, {-2851.4280,238.5864,11.2916}, {-2804.8254,545.0164,6.6052}, {-2870.0327,918.4926,44.1354}, {-2870.2593,910.3209,44.3906}, {-2854.2017,987.7276,42.0547}, {-2862.8813,1017.3004,38.2339}// fim do camerapose }; //imagems radomicas forward mycam(playerid); new countdacamera[MAX_PLAYERS]; new cccam[MAX_PLAYERS]; new cameratemp = 3000; //em OnPlayerDisconnect cccam[playerid] = 0; // no final do gm. public mycam(playerid) { if(cccam[playerid] <= 3) { new rand; rand = random(sizeof(camera)); SetPlayerPos(playerid, camera[rand][0], camera[rand][1], camera[rand][2], camera[rand][3], camera[rand][4], camera[rand][5], camera[rand][6], camera[rand][7], camera[rand][8], camera[rand][9], camera[rand][10], camera[rand][11], camera[rand][12], camera[rand][13]);//erro ta aki SetPlayerCameraLookAt(playerid, camera[rand][14], camera[rand][15], camera[rand][16], camera[rand][17], camera[rand][18], camera[rand][19], camera[rand][20], camera[rand][21], camera[rand][22], camera[rand][23], camera[rand][24], camera[rand][25], camera[rand][26], camera[rand][27]); //aki SetPlayerCameraPos(playerid, camera[rand][28], camera[rand][29], camera[rand][30], camera[rand][31], camera[rand][32], camera[rand][33], camera[rand][34], camera[rand][35], camera[rand][36], camera[rand][37], camera[rand][38], camera[rand][39], camera[rand][40], camera[rand][41]);// e aki } else { KillTimer(countdacamera[playerid]); } cccam[playerid]++; } // na public OnPlayerRequestClass ou na sua public que checa o login. countdacamera[playerid] = SetTimerEx("mycam",cameratemp,true,"i",playerid);
SetPlayerPos(playerid, camera[rand][0], camera[rand][1], camera[rand][2], camera[rand][3], camera[rand][4], camera[rand][5], camera[rand][6], camera[rand][7], camera[rand][8], camera[rand][9], camera[rand][10], camera[rand][11], camera[rand][12], camera[rand][13]);//erro ta aki SetPlayerCameraLookAt(playerid, camera[rand][14], camera[rand][15], camera[rand][16], camera[rand][17], camera[rand][18], camera[rand][19], camera[rand][20], camera[rand][21], camera[rand][22], camera[rand][23], camera[rand][24], camera[rand][25], camera[rand][26], camera[rand][27]); //aki SetPlayerCameraPos(playerid, camera[rand][28], camera[rand][29], camera[rand][30], camera[rand][31], camera[rand][32], camera[rand][33], camera[rand][34], camera[rand][35], camera[rand][36], camera[rand][37], camera[rand][38], camera[rand][39], camera[rand][40], camera[rand][41]);// e aki
SetPlayerPos(playerid, camera[rand][0], camera[rand][1], camera[rand][2]);//erro ta aki
SetPlayerCameraLookAt(playerid, camera[rand][0], camera[rand][1], camera[rand][2]); //aki
SetPlayerCameraPos(playerid, camera[rand][0], camera[rand][1], camera[rand][2]);// e
pawn Код:
|
deu certo ...mas so aparece 3 imagems, nesse caso a primeira a suganda e a terceira cordenada, e as outras nao tem como por nao nao
|
Recomendo voce criar callbacks e usar as coordenadas em cada uma delas e para passar de uma imagem para outra imagem use SetTimerEx .
Fiz isso no meu Espero ter ajudado |
new timer[MAX_PLAYERS];
forward LoginImagem1(playerid);
public LoginImagem1(playerid)
{
SetPlayerPos(/* COORDENADAS */);
SetPlayerCameraPos(/* COORDENADAS */);
SetPlayerCameraLookAt(/* COORDENADAS */);
return timer[playerid] = SetTimerEx("LoginImagem2", 5000, false, "i", playerid);
}
forward LoginImagem2(playerid);
public LoginImagem2(playerid)
{
SetPlayerPos(/* COORDENADAS */);
SetPlayerCameraPos(/* COORDENADAS */);
SetPlayerCameraLookAt(/* COORDENADAS */);
return timer[playerid] = SetTimerEx("LoginImagem3", 5000, false, "i", playerid);
}
public OnPlayerDisconnect(playerid)
{
KillTimer(timer[playerid]);
return 1;
}
Tipo assim:
PHP код:
|