acquirePedNativeEventProfile
Exclusively leases one of Neon's stock native-event adapters for a script ped.
Syntax
int|false acquirePedNativeEventProfile(ped thePed, string profile)GTA task mapping
Acquisition does not create a CTask. GTA's decision maker constructs a response only after the active profile accepts a native event; there is no direct SCM opcode for the lease.
Arguments
thePedpedScript ped; players are rejected. The mission profile requires setPedMissionActor, while ambient-wander rejects mission actors.
profilestringmission or ambient-wander.
Returns
A non-zero resource-private token, or false when the ped, profile prerequisite, profile name, or exclusive ownership check fails.
Ownership and lifecycle
Low-level ped task calls require the client that simulates the living, streamed ped. Driving tasks also require control of the streamed vehicle. They do not create lifecycle handles; the optional native-task-runtime adds server-owned route epochs and reconstruction for drive_to routes. Gang-tag ownership is resource-exclusive, survives object streaming and recreation, and is released automatically when the owner stops.
- The logical lease may be acquired before stream-in or sync ownership and survives native recreation and syncer generations.
- It becomes active only while this client is the authoritative ped syncer with a live native instance. Another resource cannot lease the same ped on this client.
- mission restores the audited mission decision path for events such as an occupied vehicle catching fire. ambient-wander admits stock pedestrian and parked-vehicle avoidance plus civilian gun-threat and damage decisions.
- Neither profile serializes the active response task across migration or loads custom SCM decision-maker files.
Example
assert(setPedMissionActor(ballas, true))local token = assert(acquirePedNativeEventProfile(ballas, "mission"))Where this comes from
Continue exploring
← Back to the Neon Lua API · How Native ped tasks and gang tags works →