Skip to content

addPedNativeBikeJackTask

Client-side

Installs GTA's canonical bike-jacked task on the authoritative local player after a synchronized ambient gang carjack is validated.

Syntax

bool addPedNativeBikeJackTask(player victim, ped jacker, vehicle bike, int door, int draggedPedDownTime, bool victimIsDriver, int token)

GTA task mapping

ORIGINAL GTA TASK
CTaskSimpleBikeJacked

GTA owns the BIKE_HIT/knock-off lifecycle after the validated task is installed.

Arguments

victimplayer

Local player currently occupying the target bike.

jackerped

Ambient script ped that owns the validated native event profile.

bikevehicle

Bike, BMX, or quadbike being jacked.

doorint

Canonical native bike door index 10 or 11.

draggedPedDownTimeint

Canonical task value: 0 for the driver or 200 for the passenger path.

victimIsDriverbool

Whether the local victim occupies the driver seat.

tokenint

Native event-profile lease token for the jacker.

Returns

true when the owner-authorized native task was queued on the local victim; false when seat, vehicle, token, or task validation 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
  • This is the low-level victim-side bridge used by synchronized ambient carjacks; ordinary gameplay resources normally use the higher-level population runtime instead.

Where this comes from

RELATED SA:O APIS

Continue exploring

Read the system guide →