Skip to content

addPedNativeDamageResponseEvent

Client-side

Available in Neon, not standard MTA

Replays GTA's civilian damage decision on the authoritative owner without applying physical damage again.

Syntax

bool addPedNativeDamageResponseEvent(ped thePed, ped attacker, int weapon, int bodypart, int token)

GTA task mapping

NATIVE GTA BEHAVIOR
No CTask is created

Submits a behavior-only CEventDamage through CEventGroup::Add. GTA chooses the response task; there is no direct SCM opcode for this bridge.

Arguments

thePedped

Living script ped that owns the active ambient-wander profile on this client.

attackerped

Different streamed ped or player responsible for the already synchronized hit.

weaponint

MTA weapon ID from unarmed through fall.

bodypartint

0 for unknown, or an MTA body-part ID from torso through head.

tokenint

Resource-private ambient-wander token for the target ped.

Returns

true when GTA accepted the behavior-only event; false for invalid arguments, a stale or foreign token, an observer client, a dead or unstreamed target, or a missing native attacker.

Ownership and lifecycle

The model-residency pass retains GTA's eight stock zone-ped slots until reset or game teardown. Candidate queries create no element; a multiplayer resource must validate proposals, create and own peds, assign one syncer, advance owner epochs, and clean up every element. Native-event tokens belong to the calling resource, activate only on the current syncer, and are revoked on resource shutdown.

Important behavior
  • Call this only after MTA has synchronized the real hit and only when the owner's ordinary native damage event was absent.
  • The replay carries no physical damage, so it can select a stock fall, recovery, flee, cower, or fight response without reducing health twice.

Where this comes from

RELATED NEON APIS

Continue exploring

Read the system guide →