[Tool/Web/Other] Funciones y metodos utiles para evitar ataques (desde script)
#9

Pues bueno, este sistema es para evitar el flood de carros y que los hackers se teletransporten a los carros:

pawn Код:
new Carro[MAX_PLAYERS];
public OnPlayerEnterVehicle(playerid, vehicleid)
{
    Carro[playerid] = 1;
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    Carro[playerid] = 0;
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
        if(Carro[playerid] == 0)
            Kick(playerid)
    return 1;
}
Y cada vez que se use el PutPlayerInVehicle actualizar la variable:
Код:
Carro[playerid] = 1;
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)