Skip to content

getAmbientPedGangGroupCandidate

Client-side

Asks GTA for a native ambient gang-group placement with two to four proposed members.

Syntax

table|false, string? getAmbientPedGangGroupCandidate(Vector3 origin, int gangId [, int maxMembers = 4])

Arguments

originVector3

Finite population origin.

gangIdint

Supported native gang ID from 0 through 7.

maxMembersintoptional · default 4

Maximum proposed group size from 2 through 4.

Returns

An array of member candidates with model, pedType, position, heading and gang metadata; or false plus a bounded miss reason.

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
  • This is a placement oracle only. The server must validate and create the real group elements.

Where this comes from

RELATED SA:O APIS

Continue exploring

Read the system guide →