Skip to content

acquirePedNativeCouple

Client-side

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

ORIGINAL GTA TASK
CTaskComplexBeInCouple

GTA owns the partner relationship, walk side, hold-hands and look-at behavior, and the give-up distance once the task is installed.

Arguments

aped

First member, simulated by this client.

bped

Second member, simulated by this client.

leaderIndexint

Which 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.

Important behavior
  • 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

RELATED SA:O APIS

Continue exploring

Read the system guide →