[FilterScript] Anti-(Player)Crasher
#10

Quote:
Originally Posted by IstuntmanI
Посмотреть сообщение
I didn't knew about this problem...

Isn't this better:
pawn Код:
public OnPlayerUpdate(playerid)
{
    if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
        new Float:vec[3];
        GetPlayerCameraFrontVector(playerid, vec[0], vec[1], vec[2]);
        for (new i = 0; i < sizeof(vec); i++)
            if (floatabs(vec[i]) > 10.0)
                return 0;
    }

    return 1;
}
(one less variable xD) ?
Yes it is less code, but I've made this one more variable named "possible_crasher" in order to point out that it MAY be crasher not MUST be.

This code is now more like anti-corrupted-aim-sync-data-something.
With this you can't be 100% sure that it is crasher, because sa-mp client sends sometimes, with no reason, corrupted front camera vector, so the best thing you can do is stop sending that data to the other players.

Your players are 100% safe now. No more crash and no more kick.
Reply


Messages In This Thread
Anti-(Player)Crasher - by bartekdvd - 13.07.2013, 12:40
Re: Anti-(Player)Crasher - by ahmad95 - 13.07.2013, 14:19
Re: Anti-(Player)Crasher - by bartekdvd - 15.07.2013, 18:15
Re: Anti-(Player)Crasher - by iJumbo - 15.07.2013, 18:36
Re: Anti-(Player)Crasher - by Dopefull - 15.07.2013, 21:30
Re: Anti-(Player)Crasher - by Konstantinos - 15.07.2013, 21:36
Re: Anti-(Player)Crasher - by Dopefull - 16.07.2013, 11:31
Re: Anti-(Player)Crasher - by Lorenc_ - 11.08.2013, 10:51
Re: Anti-(Player)Crasher - by IstuntmanI - 11.08.2013, 11:15
Re: Anti-(Player)Crasher - by bartekdvd - 11.08.2013, 15:18
Re: Anti-(Player)Crasher - by dEcooR - 11.08.2013, 17:27
Re: Anti-(Player)Crasher - by Pro_LiZzy - 11.08.2013, 20:39
Re: Anti-(Player)Crasher - by EmpireSk - 11.08.2013, 20:44
Re: Anti-(Player)Crasher - by BodyBoardVEVO - 11.08.2013, 22:01
Re: Anti-(Player)Crasher - by ReV. - 17.08.2013, 21:32
Re: Anti-(Player)Crasher - by bartekdvd - 18.08.2013, 18:30
Re: Anti-(Player)Crasher - by Strier - 23.08.2013, 21:05
Re: Anti-(Player)Crasher - by Mean - 29.08.2013, 21:05
Re: Anti-(Player)Crasher - by Roel - 09.09.2013, 07:57
Re: Anti-(Player)Crasher - by iJumbo - 09.09.2013, 09:59
Re: Anti-(Player)Crasher - by Mean - 11.09.2013, 13:57
Re: Anti-(Player)Crasher - by Sting. - 12.09.2013, 08:59

Forum Jump:


Users browsing this thread: 8 Guest(s)