acquirePedNativeCouple
Pair two NPCs and GTA makes them walk together, choose their side, hold hands, and look at each other. They separate if they move too far apart.
Syntax
int|false acquirePedNativeCouple(ped a, ped b, int leaderIndex)GTA task mapping
CTaskComplexBeInCoupleGTA owns the partner relationship, walk side, hold-hands and look-at behavior, and the give-up distance once the task is installed.
Arguments
apedFirst member, simulated by this client.
bpedSecond member, simulated by this client.
leaderIndexintWhich member leads: 1 for a, 2 for b. Any other value is rejected.
Returns
A resource-private couple token, or false when membership, ownership, streaming, or native task construction fails.
Ownership and lifecycle
Candidate queries create nothing. A multiplayer resource must validate each proposal, create and own the real NPCs and vehicles, assign one current syncer, handle ownership changes, and clean up every element. Native AI and event tokens belong to the calling resource and are revoked when that resource stops.
- The couple is atomic. A half-formed pair is refused instead of partially applied.
- Only the current syncer runs the real couple behavior; the token must be reacquired after a handoff.
- After the lease exists GTA owns walk-side selection and swapping, hand holding, looking at each other, and abandoning the couple past the give-up distance.
Where this comes from
Continue exploring
← Back to the SA:O Lua API · How Synchronized NPCs and road traffic works →