[Tutorial] [FIX]Bullet crasher 0.3.7 [FIX]
#1

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;
    }
Reply
#2

Thanks
Reply
#3

Care to explain more?
Reply
#4

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

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

Minigun is valid weapon, just re-check the condition
Reply
#7

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;
}
Reply
#8

Should return 0 to prevent the bullet from causing damage
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)