[Tutorial] [0.3z] Fix for Bullet Crasher
#1

Originally posted there: http://forum.sa-mp.com/showpost.php?...4&postcount=14 .

-------------------

This fix is patching a hack which appeared few days ago. This hack crashes players when you are near them.

-------------------

I got this hack, and used it on a test server using a debug for OnPlayerWeaponShot, this is what it returned:
pawn Код:
OnPlayerWeaponShot(0,0,1,0,2004318080.000000,2004318080.000000,2004318080.000000)
See those huge numbers ? Yeah... they are reported by that hack to the server. It is sent only with hittype BULLET_HIT_TYPE_PLAYER.

This is the fix:

pawn Код:
public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ )
{
    if( hittype != BULLET_HIT_TYPE_NONE ) // Bullet Crashing uses just this hittype
    {
        if( !( -1000.0 <= fX <= 1000.0 ) || !( -1000.0 <= fY <= 1000.0 ) || !( -1000.0 <= fZ <= 1000.0 ) ) // a valid offset, it's impossible that a offset bigger than 1000 is legit (also less than -1000.0 is impossible, not used by this hack, but still, let's check for it, just for the future, who knows what hacks will appear). The object with biggest offset is having ~700-800 radius.
        {
            /*
                If you want, here you can kick the cheater
            */

            return 0; // let's desynchronize that bullet, so players won't crash
        }
    }
    return 1;
}
I bet this will be patched in a future Release of 0.3z, but until then, feel free to use that fix.

-------------------

It's not really a tutorial, but I posted it there because in that topic (link in the first row there) almost nobody would see it.
Reply


Messages In This Thread
[0.3z] Fix for Bullet Crasher - by IstuntmanI - 04.09.2014, 18:28
Re: [0.3z] Fix for Bullet Crasher - by Sledgehammer - 04.09.2014, 19:29
Re: [0.3z] Fix for Bullet Crasher - by Pottus - 04.09.2014, 19:58
Re: [0.3z] Fix for Bullet Crasher - by DamonD - 04.09.2014, 20:19
Re: [0.3z] Fix for Bullet Crasher - by IstuntmanI - 04.09.2014, 20:24
Re: [0.3z] Fix for Bullet Crasher - by Rifa4life - 04.09.2014, 20:26
Re: [0.3z] Fix for Bullet Crasher - by iAnonymous - 04.09.2014, 21:54
Re: [0.3z] Fix for Bullet Crasher - by Pottus - 04.09.2014, 22:25
Re: [0.3z] Fix for Bullet Crasher - by Arjanz - 05.09.2014, 03:19
Re: [0.3z] Fix for Bullet Crasher - by IstuntmanI - 05.09.2014, 05:29
Re: [0.3z] Fix for Bullet Crasher - by iAnonymous - 05.09.2014, 11:10
Re: [0.3z] Fix for Bullet Crasher - by IstuntmanI - 05.09.2014, 11:19
Re: [0.3z] Fix for Bullet Crasher - by Winchaster - 05.09.2014, 11:37
Re: [0.3z] Fix for Bullet Crasher - by BroZeus - 05.09.2014, 15:32
Re: [0.3z] Fix for Bullet Crasher - by IstuntmanI - 05.09.2014, 16:19
Re: [0.3z] Fix for Bullet Crasher - by BroZeus - 06.09.2014, 07:09
Re: [0.3z] Fix for Bullet Crasher - by Battlezone - 06.09.2014, 07:32
Re: [0.3z] Fix for Bullet Crasher - by Vince - 06.09.2014, 08:27
Re: [0.3z] Fix for Bullet Crasher - by kurta999 - 06.09.2014, 10:58
Re: [0.3z] Fix for Bullet Crasher - by Calgon - 06.09.2014, 14:54
Re: [0.3z] Fix for Bullet Crasher - by IstuntmanI - 06.09.2014, 15:01
Re: [0.3z] Fix for Bullet Crasher - by dugi - 06.09.2014, 20:48
Re: [0.3z] Fix for Bullet Crasher - by IstuntmanI - 06.09.2014, 21:15
Re: [0.3z] Fix for Bullet Crasher - by Venice - 07.09.2014, 03:34
Re: [0.3z] Fix for Bullet Crasher - by Vince - 07.09.2014, 08:59
Re: [0.3z] Fix for Bullet Crasher - by PawnOX - 15.09.2014, 03:57
Re: [0.3z] Fix for Bullet Crasher - by martintasin - 11.01.2015, 13:16
Re: [0.3z] Fix for Bullet Crasher - by IstuntmanI - 11.01.2015, 15:21
Re: [0.3z] Fix for Bullet Crasher - by martintasin - 11.01.2015, 16:11
Re: [0.3z] Fix for Bullet Crasher - by Yera96 - 15.01.2015, 12:49
[0.3z] Fix for Weapon Crasher - by kaZax - 17.01.2015, 05:24
Re: [0.3z] Fix for Bullet Crasher - by TheRaGeLord - 26.01.2015, 04:27
Re: [0.3z] Fix for Bullet Crasher - by ProBrad - 03.02.2015, 14:56
Re: [0.3z] Fix for Weapon Crasher - by ProBrad - 03.02.2015, 14:58
Re: [0.3z] Fix for Bullet Crasher - by Akcent_Voltaj - 18.02.2015, 17:33
Re: [0.3z] Fix for Weapon Crasher - by HydraHumza - 28.02.2015, 05:58
Re: [0.3z] Fix for Weapon Crasher - by wampiros6 - 24.03.2015, 17:09
Re: [0.3z] Fix for Bullet Crasher - by Luca12 - 24.03.2015, 17:20
Re: [0.3z] Fix for Bullet Crasher - by FernandoLight - 22.04.2015, 18:48
Re: [0.3z] Fix for Bullet Crasher - by VenomMancer - 21.06.2015, 17:08
Re: [0.3z] Fix for Bullet Crasher - by IstuntmanI - 21.06.2015, 17:13
Re: [0.3z] Fix for Bullet Crasher - by Konverse - 21.06.2015, 17:17
Re: [0.3z] Fix for Bullet Crasher - by Lucky™ - 22.06.2015, 15:34
Re: [0.3z] Fix for Bullet Crasher - by buburuzu19 - 09.07.2015, 06:17
Re: [0.3z] Fix for Bullet Crasher - by dugi - 09.07.2015, 09:17
Re: [0.3z] Fix for Bullet Crasher - by buburuzu19 - 14.07.2015, 15:17
Re: [0.3z] Fix for Bullet Crasher - by Omirrow - 17.07.2015, 15:12
Re: [0.3z] Fix for Bullet Crasher - by uZ1 - 26.07.2015, 23:04
Re: [0.3z] Fix for Bullet Crasher - by MD5 - 01.11.2015, 11:04

Forum Jump:


Users browsing this thread: 2 Guest(s)