SA-MP Forums Archive
OnPlayerWeaponShoot - 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)
+--- Thread: OnPlayerWeaponShoot (/showthread.php?tid=618910)



OnPlayerWeaponShoot - MerryDeer - 11.10.2016

Hi,

If player shoot to vehicle where is no driver, still onplayerweaponshoot get called?


Re: OnPlayerWeaponShoot - SyS - 11.10.2016

Quote:
Description:
This callback is called when a player fires a shot from a weapon. Only bullet weapons are supported. Only passenger drive-by is supported (not driver drive-by, and not sea sparrow / hunter shots).

https://sampwiki.blast.hk/wiki/OnPlayerWeaponShot


Re: OnPlayerWeaponShoot - MerryDeer - 11.10.2016

Then other question just when driver is in car, then when i shoot vehicle HP go less?


Re: OnPlayerWeaponShoot - Rdx - 11.10.2016

Код:
if( hittype == BULLET_HIT_TYPE_VEHICLE )
{
       if(!IsVehicleOccupied(hitid)
       {
              SetVehicleHealth(..);
       }
}