addPedNativeBikeJackTask
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
CTaskSimpleBikeJackedGTA owns the BIKE_HIT/knock-off lifecycle after the validated task is installed.
Arguments
victimplayerLocal player currently occupying the target bike.
jackerpedAmbient script ped that owns the validated native event profile.
bikevehicleBike, BMX, or quadbike being jacked.
doorintCanonical native bike door index 10 or 11.
draggedPedDownTimeintCanonical task value: 0 for the driver or 200 for the passenger path.
victimIsDriverboolWhether the local victim occupies the driver seat.
tokenintNative 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.
- 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
Continue exploring
← Back to the SA:O Lua API · How Synchronized NPCs and road traffic works →