[Duvida]Teleportes -
keller012 - 19.06.2010
Eu uso o seguinte teleporte para um evento:
topo
Код:
new derby[MAX_PLAYERS];
new Float:irderby1[24][4] = {
{2610.2023925781, -2217.1296386719, 0.000000, 90.727294921875},
{2609.9526367188, -2210.7072753906, 0.000000, 90.727294921875},
{2609.8952636719, -2204.5119628906, 0.000000, 90.72509765625},
{2609.7165527344, -2198.2854003906, 0.000000, 90.72509765625},
{2609.8842773438, -2191.4077148438, 0.000000, 90.72509765625},
{2610.0466308594, -2184.7590332031, 0.000000, 90.72509765625},
{2610.0549316406, -2177.6457519531, 0.000000, 90.72509765625},
{2609.8173828125, -2171.4558105469, 0.000000, 90.72509765625},
{2610.2590332031, -2165.009765625, 0.000000, 90.72509765625},
{2610.0126953125, -2158.5908203125, 0.000000, 90.72509765625},
{2609.7580566406, -2151.7119140625, 0.000000, 90.72509765625},
{2609.7319335938, -2144.8168945313, 0.000000, 90.72509765625},
{2557.6540527344, -2216.9213867188, 0.000000, 269.06506347656},
{2557.6020507813, -2210.53515625, 0.000000, 269.06066894531},
{2557.3715820313, -2204.5571289063, 0.000000, 269.06066894531},
{2557.6171875, -2198.1376953125, 0.000000, 269.06066894531},
{2557.8544921875, -2191.9479980469, 0.000000, 269.06066894531},
{2558.091796875, -2185.7583007813, 0.000000, 269.06066894531},
{2558.3203125, -2179.7973632813, 0.000000, 269.06066894531},
{2558.5400390625, -2174.0656738281, 0.000000, 269.06066894531},
{2558.759765625, -2168.3342285156, 0.000000, 269.06066894531},
{2559.005859375, -2161.9150390625, 0.000000, 269.06066894531},
{2559.2431640625, -2155.7253417969, 0.000000, 269.06066894531},
{2559.498046875, -2149.0764160156, 0.000000, 269.06066894531}
};
Код:
if(strcmp(cmdtext, "/eventoderby1", true) == 0)
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(!dbon)
{
dbon = true;
for(new i; i < MAX_PLAYERS; i++)
{
GameTextForPlayer(i, "~g~EVENTO DERBY Liberado, para entrar no evento digite ~R~/irderby1",10000,3);
}
}
else if(dbon)
{
dbon = false;
for(new i; i < MAX_PLAYERS; i++)
{
GameTextForPlayer(i, "~r~EVENTO DERBY FECHADO",1000,3);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado a usar esse comando !");
}
}
if(strcmp(cmdtext, "/irderby1", true) == 0)
{
derby[playerid] = 1;
TogglePlayerControllable(playerid, 0);
new randpla = random(sizeof(irderby1));
if(!dbon) return SendClientMessage(playerid,0xAA3333AA,"O Evento Derby nгo estб liberado !");
SetPlayerInterior(playerid,0);
{
TogglePlayerControllable(playerid, 0);
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), 0);
derbycar = AddStaticVehicleEx(444,irderby1[randpla][0], irderby1[randpla][1], irderby1[randpla][2], irderby1[randpla][3],3,3, -1);
PutPlayerInVehicle(playerid, derbycar, 0);
TogglePlayerControllable(playerid, 0);
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 100.0);
SetPlayerVirtualWorld(playerid, 0);
SendClientMessage(playerid, COLOR_GREY,"NГO SAIA DO CARRO.CASO O FAЗA SERA MORTO AUTOMATICAMENTE.");
GameTextForPlayer(playerid,"~r~Evento Derby",2500,3);
}
return 1;
}
esse teleporte й variavel, ele vai mandando os players para a coordenada so que aleatoriamente.
eu queria faze com que ele seguisse a sequencia.
ou melhor ainda que ele nao mandasse 2 players para a mesma posicao.
Re: [Duvida]Teleportes -
ipsBruno - 19.06.2010
@TOPIC:
Tenta Assim, Criei usando Loops, posso estar errado
pawn Код:
#include <a_samp>
new Float:irderby1[24][4] = {
{2610.2023925781, -2217.1296386719, 0.000000, 90.727294921875},
{2609.9526367188, -2210.7072753906, 0.000000, 90.727294921875},
{2609.8952636719, -2204.5119628906, 0.000000, 90.72509765625},
{2609.7165527344, -2198.2854003906, 0.000000, 90.72509765625},
{2609.8842773438, -2191.4077148438, 0.000000, 90.72509765625},
{2610.0466308594, -2184.7590332031, 0.000000, 90.72509765625},
{2610.0549316406, -2177.6457519531, 0.000000, 90.72509765625},
{2609.8173828125, -2171.4558105469, 0.000000, 90.72509765625},
{2610.2590332031, -2165.009765625, 0.000000, 90.72509765625},
{2610.0126953125, -2158.5908203125, 0.000000, 90.72509765625},
{2609.7580566406, -2151.7119140625, 0.000000, 90.72509765625},
{2609.7319335938, -2144.8168945313, 0.000000, 90.72509765625},
{2557.6540527344, -2216.9213867188, 0.000000, 269.06506347656},
{2557.6020507813, -2210.53515625, 0.000000, 269.06066894531},
{2557.3715820313, -2204.5571289063, 0.000000, 269.06066894531},
{2557.6171875, -2198.1376953125, 0.000000, 269.06066894531},
{2557.8544921875, -2191.9479980469, 0.000000, 269.06066894531},
{2558.091796875, -2185.7583007813, 0.000000, 269.06066894531},
{2558.3203125, -2179.7973632813, 0.000000, 269.06066894531},
{2558.5400390625, -2174.0656738281, 0.000000, 269.06066894531},
{2558.759765625, -2168.3342285156, 0.000000, 269.06066894531},
{2559.005859375, -2161.9150390625, 0.000000, 269.06066894531},
{2559.2431640625, -2155.7253417969, 0.000000, 269.06066894531},
{2559.498046875, -2149.0764160156, 0.000000, 269.06066894531}
};
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/tele", true))
{
for(new tele; tele < 24;)//24 Numero de Teles
{
if(tele <= 24)//checa se esta a Ultima Coordenada
{
tele += 1;//Aumenta o Loop cada que alguem digita comando
new rnd = tele;//rnd = numero da coordenda
SetPlayerPos(playerid, irderby1[rnd][0], irderby1[rnd][1], irderby1[rnd][2]);//Seta POS
/*************COMANDO AQUI****************/
/*************COMANDO AQUI****************/
/*************COMANDO AQUI****************/
/*************COMANDO AQUI****************/
/*************COMANDO AQUI****************/
/*************COMANDO AQUI****************/
/*************COMANDO AQUI****************/
/*************COMANDO AQUI****************/
}else{//Caso for maior que 24
tele = 0;//Iremos Voltar a Coordenada 0 ou 1,nгo lembra a inicial do Loop
}
}
return 1;
}
return 0;
}
caso nгo consiga entra em contato com o Russso ele sabe bastante disso , ele й o cara
@OFF:
Putz jб й a Quarta vez que eu mudo aqui, nгo sei muito certo...