Skip to content

getPedNativeCoupleDiagnostic

Client-side

Returns focused lease, task, and per-member diagnostics for one native couple token.

Syntax

table|false getPedNativeCoupleDiagnostic(int token)

Arguments

tokenint

Couple token owned by the calling resource.

Returns

A table with active, reason, nativeCoupleId, resourceLeasePresent, gameLeasePresent, aLeader and two per-member tables; false when no resource context exists.

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
  • reason names the exact failure: resource-lease-missing, resource-element-not-ped, resource-ped-not-syncing, game-lease-missing, lease-member-mismatch, primary-task-missing, primary-task-replaced, partner-mismatch, role-mismatch, or active.
  • Each member table reports reciprocalPartner and leaderRoleMatches, which is how a pair that looks visually broken is diagnosed.
  • This is a debugging surface, not gameplay state to synchronize.

Where this comes from

RELATED SA:O APIS

Continue exploring

Read the system guide →