Skip to content

setPedExitVehicle

Client-side

Tell an NPC to leave its vehicle and GTA performs the original exit movement, animation, and door handling.

Syntax

bool setPedExitVehicle(ped thePed)

GTA task mapping

ORIGINAL GTA TASK 05CD
CTaskComplexLeaveCar

SCM equivalent: TASK_LEAVE_CAR

The syncer constructs GTA's leave-car task only after the established MTA vehicle request is accepted; true does not mean the ped is already outside.

Arguments

thePedped

Ped requesting exit.

Returns

true when the authoritative exit request was accepted; false otherwise.

Ownership and lifecycle

Low-level ped task calls require the client that simulates the living, streamed ped. Driving tasks also require control of the streamed vehicle. They do not create lifecycle handles; the optional native-task-runtime adds server-owned route epochs and reconstruction for drive_to routes. Gang-tag ownership is resource-exclusive, survives object streaming and recreation, and is released automatically when the owner stops.

OOP aliases

  • ped:setExitVehicle()

Where this comes from

RELATED SA:O APIS

Continue exploring

Read the system guide →