OnSniperRifleFired

From NPC for VCMP 0.4 Servers
Revision as of 11:41, 27 November 2022 by Habi (talk | contribs)
Jump to navigation Jump to search


Description:
This function is called when a player fires a sniper rifle. This function is not called if the npc itself is firing the sniper rifle using FireSniperRifle. If more than one npc is there, this function gets called when other npcs fire sniper rifle using FireSniperRifle.


Parameters:

( playerid, weaponid, x, y, z, dx, dy, dz )
)

playerId : The ID of the player who fired
weaponid: The ID of the weapon fired. ( Usually 28 or 29 )
x : The source x co-ordinate of the firing.
y : The source y co-ordinate of the firing.
z : The source z co-ordinate of the firing
dx : The x component of the normalized direction vector multiplied by 16.0
dy : The y component of the normalized direction vector multiplied by 16.0
dz : The z component of the normalized direction vector multiplied by 16.0