isPedSittingInVehicle
IS_PED_SITTING_IN_VEHICLE0xA808AA1D79230FC2The 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.
isPedSittingInVehicle(ped: Ped, vehicle: Vehicle): booleanisPedSittingInVehicle(ped: Ped, vehicle: Vehicle): booleanUsage
JavaScript
const result = isPedSittingInVehicle(ped, vehicle);Lua
local result = isPedSittingInVehicle(ped, vehicle)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
vehicle | Vehicle | number | integer |
Returns
BOOL JavaScript boolean, Lua booleanNotes
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