Skip to content

processBirdGunShot

Client-side

Available in Neon, not standard MTA

Runs a gunshot trace against every shootable managed bird, for custom weapon systems.

Syntax

bool processBirdGunShot(element attacker, int weapon, Vector3 start, Vector3 end)

Arguments

attackerelement

Element credited with the shot.

weaponint

Weapon ID reported to the event.

startVector3

Trace start.

endVector3

Trace end.

Returns

true when the trace hit a shootable managed bird; false otherwise.

Ownership and lifecycle

A bird belongs to the client resource that created it and is removed when that resource stops. Birds fade near their render distance instead of being destroyed, and a dimension or interior mismatch hides them while keeping the element alive.

Important behavior
  • This exposes the same hit test the built-in path uses, so a custom weapon or bullet system can participate instead of reimplementing it.
  • A hit raises the cancellable onClientBirdShot event.
  • The reference harness feeds onClientPlayerWeaponFire traces through this function.

Where this comes from

RELATED NEON APIS

Continue exploring

Read the system guide →