12.03.2012, 02:08
Quote:
|
ainda nao testei mas vou ver se dб
![]() isso muda automaticamente durante alguns segundos certo? o que queria era que ela muda-se no mesmo player em cada X tempo |
ele sу fazia com q toda vez q alguem estiver no login, ela fique olhando pra alguma tela aleatoriamente.
mais, pega este aqui embaixo, reformulei ele, e add um timer, para funcionar da forma que vc quer. ^^
pawn Код:
// no topo do gm
new Float:camera[5][9] =
{
{0.0, 0.0, 0.0, // muda essas coordenadas, para as coordenadas das cameras que vc quer
0.0, 0.0, 0.0,
0.0, 0.0, 0.0},
{1.1, 1.1, 1.1,
1.1, 1.1, 1.1,
1.1, 1.1, 1.1},
{2.2, 2.2, 2.2,
2.2, 2.2, 2.2,
2.2, 2.2, 2.2},
{3.3, 3.3, 3.3,
3.3, 3.3, 3.3,
3.3, 3.3, 3.3},
{4.4, 4.4, 4.4,
4.4, 4.4, 4.4,
4.4, 4.4, 4.4}
};
// no topo do gm, perto das forwards
forward mycam(playerid);
//no topo do gm, perto das variaveis
new count[MAX_PLAYERS];
new cccam[MAX_PLAYERS];
new csegundos = 5000; // mude para quantos segundos vc quer e mde as cameras.
//em OnPlayerDisconnect
cccam[playerid] = 0;
// no final do gm.
public mycam(playerid)
{
if(cccam[playerid] <= 5)
{
new rand;
rand = random(sizeof(camera));
SetPlayerPos(playerid, camera[rand][0], camera[rand][1], camera[rand][2]);
SetPlayerCameraPos(playerid, camera[rand][3], camera[rand][4], camera[rand][5]);
SetPlayerCameraLookAt(playerid,camera[rand][6], camera[rand][7], camera[rand][8]);
}
else
{
KillTimer(count[playerid]);
}
cccam[playerid]++;
}
// na public OnPlayerRequestClass ou na sua public que checa o login.
count[playerid] = SetTimerEx("mycam",csegundos,true,"i",playerid);



