[FilterScript] Anti OnFoot Crasher
#1

Актуально для версий серверов ниже 0.3x R2

Многие искали защитку от: читер бьёт кулаком и все вокруг него вылетают.
Решил поделиться.
Вот простой скриптиг.
pawn Код:
#include <a_samp>

new FirstKick[MAX_PLAYERS char];
public OnPlayerConnect(playerid)
{
    FirstKick{playerid}=0;
    return 1;
}

public OnPlayerUpdate(playerid)
{
    new Float:x,Float:y,Float:z;
    GetPlayerCameraFrontVector(playerid,x,y,z);
    if(floatcmp(1.0, floatabs(x))==-1 || floatcmp(1.0, floatabs(y))==-1 || floatcmp(1.0, floatabs(z))==-1)
    {
        if(FirstKick{playerid})
        {
            Kick(playerid);
        }
        else
        {
            FirstKick{playerid}=1;//ложный вызов из-за старых данных.
        }
        return 0;
    }
    return 1;
}
Второй вариант, для тех у кого проблемы с числами. Более мягкий, минимум ложных/случайных киков. Предпочтительный.
pawn Код:
#include <a_samp>

new AOFCT[MAX_PLAYERS];
new AOFCW[MAX_PLAYERS char];
public OnPlayerUpdate(playerid)
{
    new Float:x,Float:y,Float:z;
    GetPlayerCameraFrontVector(playerid,x,y,z);
    if(floatcmp(1.0, floatabs(x))==-1 || floatcmp(1.0, floatabs(y))==-1 || floatcmp(1.0, floatabs(z))==-1)
    {
        if(AOFCT[playerid] < GetTickCount())AOFCW{playerid}=0; else AOFCW{playerid}++;
        if(AOFCW{playerid} < 2) AOFCT[playerid]=GetTickCount()+1000; else
        {
            Kick(playerid);
        }
        return 0;
    }
    return 1;
}
Reply


Messages In This Thread
Anti OnFoot Crasher - by White_116 - 20.07.2013, 19:48
Re: Anti OnFoot Crasher - by stabker - 20.07.2013, 20:04
Re: Anti OnFoot Crasher - by White_116 - 20.07.2013, 20:07
Re: Anti OnFoot Crasher - by Mutha_X - 20.07.2013, 20:56
Re: Anti OnFoot Crasher - by White_116 - 21.07.2013, 09:56
Re: Anti OnFoot Crasher - by Jon_De - 21.07.2013, 11:31
Re: Anti OnFoot Crasher - by White_116 - 21.07.2013, 11:43
Re: Anti OnFoot Crasher - by Jon_De - 21.07.2013, 13:02
Re: Anti OnFoot Crasher - by AirKite - 21.07.2013, 14:51
Re: Anti OnFoot Crasher - by White_116 - 21.07.2013, 15:05
Re: Anti OnFoot Crasher - by x_O - 21.07.2013, 15:31
Re: Anti OnFoot Crasher - by Jon_De - 21.07.2013, 17:38
Re: Anti OnFoot Crasher - by x_O - 21.07.2013, 18:05
Re: Anti OnFoot Crasher - by Mutha_X - 22.07.2013, 06:10
Re: Anti OnFoot Crasher - by stabker - 22.07.2013, 21:05
Re: Anti OnFoot Crasher - by Jon_De - 23.07.2013, 12:48
Re: Anti OnFoot Crasher - by AirKite - 23.07.2013, 16:10
Re: Anti OnFoot Crasher - by stabker - 23.07.2013, 16:53
Re: Anti OnFoot Crasher - by White_116 - 23.07.2013, 17:25
Re: Anti OnFoot Crasher - by AirKite - 23.07.2013, 17:39
Re: Anti OnFoot Crasher - by White_116 - 23.07.2013, 17:54
Re: Anti OnFoot Crasher - by Size - 25.07.2013, 08:44
Re: Anti OnFoot Crasher - by x_O - 25.07.2013, 09:18
Re: Anti OnFoot Crasher - by Size - 25.07.2013, 09:34
Re: Anti OnFoot Crasher - by SkyWay - 25.07.2013, 20:25
White_116 - by AirKite - 26.07.2013, 11:48
Re: Anti OnFoot Crasher - by White_116 - 03.08.2013, 22:28
Re: Anti OnFoot Crasher - by x_O - 04.08.2013, 02:26
Respuesta: Anti OnFoot Crasher - by Glimma - 04.08.2013, 02:51
Re: Respuesta: Anti OnFoot Crasher - by BJIADOKC - 04.08.2013, 04:23
Re: Anti OnFoot Crasher - by 26_RUSSS - 30.08.2013, 21:45
Re: Anti OnFoot Crasher - by White_116 - 31.08.2013, 07:06
Re: Anti OnFoot Crasher - by stabker - 31.08.2013, 14:42
Re: Anti OnFoot Crasher - by 26_RUSSS - 06.09.2013, 17:40
Re: Anti OnFoot Crasher - by =KempeR= - 28.10.2013, 23:39

Forum Jump:


Users browsing this thread: 3 Guest(s)