RedM Natives

IS_PED_IN_VEHICLE

Hash0x7DA6BC83
Runtime nameIsPedInVehicle
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

BOOL IS_PED_IN_VEHICLE(Ped ped, Vehicle vehicle);

Parameters

NameTypeDescription
pedPed

the ped id

vehicleVehicle

the vehicle id

Returns BOOL — Returns `true` if the specified `ped` is in the specified `vehicle`

Usage

Lua
local retval = IsPedInVehicle(ped, vehicle)

-- always works, by hash
local retval = Citizen.InvokeNative(0x7da6bc83, ped, vehicle, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const retval = IsPedInVehicle(ped, vehicle);

// by hash
const retval = Citizen.invokeNative('0x7da6bc83', ped, vehicle, Citizen.returnResultAnyway());
C#
bool retval = Function.Call<bool>((Hash)0x7da6bc83, ped, vehicle);

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.