PedClient

isPedSittingInVehicle

IS_PED_SITTING_IN_VEHICLE0xA808AA1D79230FC2

The GTA V native IS_PED_SITTING_IN_VEHICLE of the PED namespace, as LS:MP client scripts call it: the global function isPedSittingInVehicle, in JavaScript and in Lua.

SignatureJavaScript
isPedSittingInVehicle(ped: Ped, vehicle: Vehicle): boolean
SignatureLua
isPedSittingInVehicle(ped: Ped, vehicle: Vehicle): boolean

Usage

JavaScript
const result = isPedSittingInVehicle(ped, vehicle);
Lua
local result = isPedSittingInVehicle(ped, vehicle)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
vehicleVehiclenumberinteger

Returns

BOOL JavaScript boolean, Lua boolean

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Detect if ped is sitting in the specified vehicle
[True/False]

Reference

Namespace
Ped PED
In the game
BOOL IS_PED_SITTING_IN_VEHICLE(Ped ped, Vehicle vehicle)
Hash
0xA808AA1D79230FC2

Open in the interactive natives reference