isPedInVehicle
IS_PED_IN_VEHICLE0xA3EE4A07279BB9DBThe GTA V native IS_PED_IN_VEHICLE of the PED namespace, as LS:MP client scripts call it: the global function isPedInVehicle, in JavaScript and in Lua.
isPedInVehicle(ped: Ped, vehicle: Vehicle, atGetIn: boolean): booleanisPedInVehicle(ped: Ped, vehicle: Vehicle, atGetIn: boolean): booleanUsage
const result = isPedInVehicle(ped, vehicle, atGetIn);local result = isPedInVehicle(ped, vehicle, atGetIn)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
vehicle | Vehicle | number | integer |
atGetIn | BOOL | boolean | boolean |
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.
Gets a value indicating whether the specified ped is in the specified vehicle.
If 'atGetIn' is false, the function will not return true until the ped is sitting in the vehicle and is about to close the door. If it's true, the function returns true the moment the ped starts to get onto the seat (after opening the door). Eg. if false, and the ped is getting into a submersible, the function will not return true until the ped has descended down into the submersible and gotten into the seat, while if it's true, it'll return true the moment the hatch has been opened and the ped is about to descend into the submersible.
Reference
- Namespace
- Ped PED
- In the game
BOOL IS_PED_IN_VEHICLE(Ped ped, Vehicle vehicle, BOOL atGetIn)- Hash
0xA3EE4A07279BB9DB