21.08.2013, 13:22
(
Последний раз редактировалось GTO.DoDo; 21.08.2013 в 18:06.
)
Agora na V2.0, Consegue perceber, quem crashou o [veiculo] Breve ira ver quem crashou sem ta em algum veiculo!
Video Provando Funcionamento:
[ame]http://www.youtube.com/watch?v=DfgKeGDjjhs[/ame]
Creditos:
DoDo
Код HTML:
new VeiculoBugado[MAX_VEHICLES];
stock VerificarVeiculoCrashado(playerid, id)
{
if(!VeiculoBugado[id])
{
VeiculoBugado[id] = id;
new Float:Pos[3];
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerPos(i, Pos[0], Pos[1], Pos[2]);
if(GetPlayerVehicleID(i) == VeiculoBugado[id])
{
if(Pos[0] >= 999999.875000 || Pos[1] >= 10000000.000000 || Pos[2] >= 1410065408.000000)
{
CrashadoVeiculo(i);
}
else
{
CrashouVeiculo(i);
}
}
}
}
VeiculoBugado[id] = -1;
}
}
stock CrashadoVeiculo(i)
{
GameTextForPlayer(i, "Retornando a tela inicial", 10000, 5);
SetPlayerPos(i, 0.0, 0.0, 0.0);
SpawnPlayer(i);
}
stock CrashouVeiculo(i)
{
Ban(i);
}
public OnPlayerUpdate(playerid)
{
new Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
if(pos[0] >= 10000000.000000 || pos[1] >= 10000000.000000 || pos[2] >= 1410065408.000000)
{
if(IsPlayerInAnyVehicle(playerid))
{
VerificarVeiculoCrashado(playerid, GetPlayerVehicleID(playerid));
}
GameTextForPlayer(playerid, "Retornando a tela inicial", 10000, 5);
SetPlayerPos(playerid, 0.0, 0.0, 0.0);
SpawnPlayer(playerid);
}
return 0x01;
}
[ame]http://www.youtube.com/watch?v=DfgKeGDjjhs[/ame]
Creditos:
DoDo