addPedNativeGunAimedAtEvent
Inserts GTA's real aimed-at event on the authoritative ambient-ped owner.
Syntax
bool addPedNativeGunAimedAtEvent(ped thePed, ped aimingPed, int token)GTA task mapping
Creates CEventGunAimedAt and submits it through CEventGroup::Add. GTA may then choose a response task; there is no direct SCM opcode for this event bridge.
Arguments
thePedpedLiving script ped that owns the active ambient-wander profile on this client.
aimingPedpedDifferent streamed ped or player whose synchronized aim triggered the event.
tokenintResource-private ambient-wander token for the target ped.
Returns
true when GTA accepted the event; false for an invalid or identical ped, a stale or foreign token, an observer client, a dead or unstreamed target, or a missing native aiming ped.
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.
- The server should validate the synchronized aim transition before asking the current owner to call this bridge.
- The event lets the civilian decision maker choose its stock response. It does not grant authority to an observer or advance mission state.
Where this comes from
Continue exploring
← Back to the Neon Lua API · How Synchronized ambient pedestrians works →