OnClientWeaponFire

From Multi Theft Auto: Wiki
Revision as of 22:46, 25 August 2012 by Arran Fortuna (talk | contribs) (New)
Jump to navigation Jump to search


Weapon creation event.

Called post firing so properties can be changed per shot

Source is the weapon that fired

Can be cancelled with cancelEvent to prevent the shot.

Syntax

onClientWeaponFire ( entity hitEntity, posX, posY, posZ, normalX, normalY, normalZ, int materialType, int lighting, int pieceHit )
 - hitEntity the entity it will hit
 - posX the position it will hit
 - posY the position it will hit
 - posZ the position it will hit
 - normalX the normal it hit ( see processLineOfSight )
 - normalY the normal it hit ( see processLineOfSight )
 - normalZ the normal it hit ( see processLineOfSight )
 - materialType the material type it hit ( see processLineOfSight )
 - lighting the lighting of the entity it hit ( see processLineOfSight )
 - pieceHit the piece of the entity it hit ( see processLineOfSight )

Example

This example calls server events, when an object was hit, or the player shot at something with a special gun.


See Also