OnPlayerProjectileCreation

From Multi Theft Auto: Wiki
Revision as of 22:35, 14 November 2023 by Zangomangu (talk | contribs) (Created page with "__NOTOC__ {{Server event}} {{Added feature/item|1.6.1|1.6.0|22293|This event is triggered every time a projectile is created by a player - either through a weapon, a vehicle weapon or createProjectile.}} ==Parameters== <syntaxhighlight lang="lua"> int weaponType, float x, float y, float z, float force, element target, float rotX, float rotY, float rotZ, float velX, float velY, float velZ </syntaxhighlight> *'''weaponType:''' ID, see below {{Projectiles}} *'''x:''...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

BETA: NEW FEATURE (BUILD: 1.6.0 r22293)
This event is triggered every time a projectile is created by a player - either through a weapon, a vehicle weapon or createProjectile.

Parameters

int weaponType, float x, float y, float z, float force, element target, float rotX, float rotY, float rotZ, float velX, float velY, float velZ
  • weaponType: ID, see below
ID Name/Description
16 Grenade
17 Tear Gas Grenade
18 Molotov
19 Rocket (simple)
20 Rocket (heat seeking)
21 Air Bomb
39 Satchel Charge
58 Hydra flare
  • x: X coordinate of where the projectile was created
  • y: Y coordinate of where the projectile was created
  • z: Z coordinate of where the projectile was created
  • force: force of thrown projectile. Valid for ID 16, 17, 18, 39.
  • target: element the projectile is targeting. Valid for ID 19, 20.
  • rotX: X rotation. Valid for ID 19, 20.
  • rotY: Y rotation. Valid for ID 19, 20.
  • rotZ: Z rotation. Valid for ID 19, 20.
  • velX: X axis velocity. Valid for ID 16, 17, 18, 19, 20, 39.
  • velY: Y axis velocity. Valid for ID 16, 17, 18, 19, 20, 39.
  • velZ: Z axis velocity. Valid for ID 16, 17, 18, 19, 20, 39.

Source

The source of this event is the player who created the projectile.

Canceling

If this event is canceled, the projectile will not be created for other players on the server.

Example


See Also

Player events


Event functions