Skip to content

acquirePedNativeGroup

Client-side

Put several NPCs into one group so GTA treats them as a single walking group and manages their shared movement.

Syntax

int|false acquirePedNativeGroup(table peds, string profile)

Arguments

pedstable

Array of two to five script peds simulated by this client.

profilestring

Currently ambient-random.

Returns

A resource-private group token, or false when membership, ownership, streaming, or native group-slot checks fail.

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 token is resource-owned and must be reacquired after a syncer handoff.
  • Only the current owner runs the native group intelligence.

Where this comes from

RELATED SA:O APIS

Continue exploring

Read the system guide →