SA-MP Forums Archive
[FilterScript] Anti-(Player)Crasher - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Anti-(Player)Crasher (/showthread.php?tid=450481)

Pages: 1 2


Anti-(Player)Crasher - bartekdvd - 13.07.2013

pawn Код:
#define FILTERSCRIPT

#include <a_samp>
 
//Anti-(Player)Crasher  0.3x
//by bartekdvd
public OnPlayerUpdate(playerid)
{
    if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
        new Float:vec[3];
        GetPlayerCameraFrontVector(playerid, vec[0], vec[1], vec[2]);
        new bool:possible_crasher = false;
        for (new i = 0; !possible_crasher && i < sizeof(vec); i++)
            if (floatabs(vec[i]) > 10.0)
                possible_crasher = true;
       
        if (possible_crasher)
            return 0; //do not send fake data, prevents crash
    }

    return 1;
}
Q: What is the issue?
A: The attacker sends modified aiming information like bad camera front vector or/and bad camera position. If attacker wants to crash his victim he needs to switch to some melee weapon and press secondary attack key.

Q: What is the range of attack?
A: If attacker is only streamed for some player he can crash him.

Q: Can you send me this crasher program?
A: Nope.

Probably most of you didn't know about this issue.

DOWNLOAD: http://pastebin.com/egd2RdYt


Re: Anti-(Player)Crasher - ahmad95 - 13.07.2013

EDIT: Tried, yes truely random kick. gonna remove it.


Re: Anti-(Player)Crasher - bartekdvd - 15.07.2013

If someone could test it now whether it randomly kicks normal players or not I would be really grateful.


Re: Anti-(Player)Crasher - iJumbo - 15.07.2013

Try use a larger value


Re: Anti-(Player)Crasher - Dopefull - 15.07.2013

So you made a mod that starts with S***** which is not allowed to say on this forum and you are patching some of its features?


Re: Anti-(Player)Crasher - Konstantinos - 15.07.2013

Quote:
Originally Posted by Dopefull
Посмотреть сообщение
So you made a mod that starts with S***** which is not allowed to say on this forum and you are patching some of its features?
Did you read the word "Anti" before the rest of the title? I don't think so.


Re: Anti-(Player)Crasher - Dopefull - 16.07.2013

Quote:
Originally Posted by _Zeus
Посмотреть сообщение
Did you read the word "Anti" before the rest of the title? I don't think so.
Did you read the last part of my message?

Код:
and you are patching some of its features?
I was referring to that he has made a crasher once ( go find that one for yourself ) and now he's patching it, just seems funny

On topic: seems as a good filterscript good job


Re: Anti-(Player)Crasher - Lorenc_ - 11.08.2013

God bless.


Re: Anti-(Player)Crasher - IstuntmanI - 11.08.2013

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) ?


Re: Anti-(Player)Crasher - bartekdvd - 11.08.2013

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.


Re: Anti-(Player)Crasher - dEcooR - 11.08.2013

hmm should i believe you ? lets use it


Re: Anti-(Player)Crasher - Pro_LiZzy - 11.08.2013

Nice but new crasher is coming out soon.Hope there will be some fix for it.


Re: Anti-(Player)Crasher - EmpireSk - 11.08.2013

I <3 balcan AC


Re: Anti-(Player)Crasher - BodyBoardVEVO - 11.08.2013

Wow, idk if FS is correct, but wow on 53 reputation points, just wow!


Re: Anti-(Player)Crasher - ReV. - 17.08.2013

It detects the crasher afaik, but its retuning too many false-positives, anyway you can tune it so it only detects the crasher?


Re: Anti-(Player)Crasher - bartekdvd - 18.08.2013

Quote:
Originally Posted by [Hunter]
Посмотреть сообщение
It detects the crasher afaik, but its retuning too many false-positives, anyway you can tune it so it only detects the crasher?
I think we need to wait for the official client fix. I can tune it a little bit, but I can't really get 100% accuracy. The best way is returning 0 in OnPlayerUpdate instead of kicking or banning player.
With the current version of my script crashers can't crash players, so they are not threat anymore.


Re: Anti-(Player)Crasher - Strier - 23.08.2013

Mind helping me? this doesn't work for me for some reason, with the crasher in wich they have to click RMB, didn't try with the "/crasher" one... idk what's wrong bartekdvd?


Re: Anti-(Player)Crasher - Mean - 29.08.2013

BTW
pawn Код:
public OnVehicleMod(playerid,vehicleid,componentid) {
    if(GetPlayerInterior(playerid) == 0) return 0;
    return 1;
}
This prevents crashers via carmods-


Re: Anti-(Player)Crasher - Roel - 09.09.2013

Quote:
Originally Posted by Mean
Посмотреть сообщение
Isn't this all that is needed?
pawn Код:
public OnVehicleMod(playerid,vehicleid,componentid) {
    if(GetPlayerInterior(playerid) == 0) return 0;
    return 1;
}
This code prevents crashers 100%, unless you have vehicles in interiors.
Can you explain to me how this should prevent crashers?


Re: Anti-(Player)Crasher - iJumbo - 09.09.2013

Users try to mod vehicles with non-accepted mods on that vehicle and teleport to other players. crash xD

In this way you do not allow vehicle mod in interior 0