SA-MP Forums Archive
[Tutorial] [FIX]Bullet crasher 0.3.7 [FIX] - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] [FIX]Bullet crasher 0.3.7 [FIX] (/showthread.php?tid=581140)



[FIX]Bullet crasher 0.3.7 [FIX] - Crystallize - 10.07.2015

I think this might fix the problem with the new published bullet crasher , at least worked for me but it might be another crasher well who knows , not me :P
Код:
    #include <a_samp>
     
    public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
    {
            if(!((22 <= weaponid <= 34) || weaponid == 38)) Kick(playerid);
            return 1;
    }



Re: [FIX]Bullet crasher 0.3.7 [FIX] - Blackphoenixz - 10.07.2015

Thanks


Re: [FIX]Bullet crasher 0.3.7 [FIX] - Face9000 - 11.07.2015

Care to explain more?


Re: [FIX]Bullet crasher 0.3.7 [FIX] - XxBaDxBoYxX - 11.07.2015

Quote:
Originally Posted by Face9000
Посмотреть сообщение
Care to explain more?
It checks if you are actually shooting with a valid weapon or not.


Re: [FIX]Bullet crasher 0.3.7 [FIX] - Abagail - 11.07.2015

Why isn't the minigun a valid weapon? It shoots bullets, it as far as I know triggers the callback.


Re: [FIX]Bullet crasher 0.3.7 [FIX] - kurta999 - 12.07.2015

Minigun is valid weapon, just re-check the condition


Re: [FIX]Bullet crasher 0.3.7 [FIX] - MerryDeer - 04.01.2017

Can return 0;?

public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(!((22 <= weaponid <= 34) || weaponid == 3)
{
Kick(playerid);
return 0;
}
return 1;
}


Re: [FIX]Bullet crasher 0.3.7 [FIX] - Sibuscus - 15.03.2017

Should return 0 to prevent the bullet from causing damage