RedM Natives

GET_VEHICLE_PED_IS_IN

Gets the vehicle the specified Ped is in.

Hash0x9A9112A0FE9A4713
Runtime nameGetVehiclePedIsIn
NamespacePED
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x9A9112A0FE9A4713

Signature

Vehicle GET_VEHICLE_PED_IS_IN(Ped ped, BOOL lastVehicle);

Parameters

NameTypeDescription
pedPed—
lastVehicleBOOL—

Returns Vehicle

Description

Gets the vehicle the specified Ped is in.

If the Ped is not in a vehicle and includeLastVehicle is true, the vehicle they were last in is returned.

Usage

Lua
local retval = GetVehiclePedIsIn(ped, lastVehicle)

-- always works, by hash
local retval = Citizen.InvokeNative(0x9A9112A0FE9A4713, ped, lastVehicle, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetVehiclePedIsIn(ped, lastVehicle);

// by hash
const retval = Citizen.invokeNative('0x9A9112A0FE9A4713', ped, lastVehicle, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x9A9112A0FE9A4713, ped, lastVehicle);

Sources

alloc8or RDR3 NativeDB

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