RedM Natives

GET_VEHICLE_INDEX_FROM_ENTITY_INDEX

Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).

Hash0xDF1E5AAC561AFC59
Runtime nameGetVehicleIndexFromEntityIndex
NamespaceENTITY
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x4B53F92932ADFAC0

Signature

Vehicle GET_VEHICLE_INDEX_FROM_ENTITY_INDEX(Entity entity);

Parameters

NameTypeDescription
entityEntity—

Returns Vehicle

Description

Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).

Usage

Lua
local retval = GetVehicleIndexFromEntityIndex(entity)

-- always works, by hash
local retval = Citizen.InvokeNative(0xDF1E5AAC561AFC59, entity, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetVehicleIndexFromEntityIndex(entity);

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

Sources

alloc8or RDR3 NativeDB

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