Skip to content

updateAmbientPedPopulationModels

Client-side

Runs GTA's ped-only zone-model residency pass around an origin without enabling unmanaged population creation.

Syntax

bool updateAmbientPedPopulationModels(Vector3 origin)

Arguments

originVector3

Finite world position whose native population zone should be kept current.

Returns

true after the native residency pass runs; argument validation reports an error for an invalid vector.

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
  • Call this while candidate generation is active, normally from onClientPreRender as the reference resource does.
  • The pass can retain up to eight stock population models and creates no ped. Call resetAmbientPedPopulationModels when generation stops.

Where this comes from

RELATED SA:O APIS

Continue exploring

Read the system guide →