[FilterScript] Anti Crash [2.0]
#1

Agora na V2.0, Consegue perceber, quem crashou o [veiculo] Breve ira ver quem crashou sem ta em algum veiculo!



Код 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;
}
Video Provando Funcionamento:

[ame]http://www.youtube.com/watch?v=DfgKeGDjjhs[/ame]


Creditos:

DoDo
Reply


Messages In This Thread
Anti Crash [2.0] - by GTO.DoDo - 21.08.2013, 13:22
Re: Anti Crash [2.0] - by XxFaTaLxX - 21.08.2013, 14:25
Re: Anti Crash [2.0] - by StrondA_ - 21.08.2013, 14:28
Re: Anti Crash [2.0] - by GTO.DoDo - 21.08.2013, 14:45
Re: Anti Crash [2.0] - by smiiir - 21.08.2013, 16:41
Re: Anti Crash [2.0] - by Juniiro3 - 21.08.2013, 16:59
Re: Anti Crash [2.0] - by GTO.DoDo - 21.08.2013, 18:07

Forum Jump:


Users browsing this thread: 1 Guest(s)