tipo o que queria meter era imagens rondoricas no login
Um script que me ajuda-se adicionar mais cameras ter exemplo 5 cameras diferentes para o login |
// no topo do gm
new Float:camera[5][9] =
{
{0.0, 0.0, 0.0, // mudar para as cordenadas 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 final do gm.
public mycam(playerid)
{
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]);
}
// na public OnPlayerRequestClass ou na sua public que checa o login.
mycam(playerid);
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 |
// 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);
new random = random(3);
switch(random) {
case 1: {
//camerapos aqui
}
case 2: {
//camerapos aqui
}
case 3: {
//camerapos aqui
}
}