The Lab
ENTITY native

GET_VEHICLE_INDEX_FROM_ENTITY_INDEX

returns Vehicle1 parambuild 1207

Casts an entity handle to a vehicle handle.

Signature

C
Vehicle GET_VEHICLE_INDEX_FROM_ENTITY_INDEX(Entity entity); // 0xDF1E5AAC561AFC59 b1207

Parameters

#NameType
1entityEntity

Facts

Facts about GET_VEHICLE_INDEX_FROM_ENTITY_INDEX
Name
GET_VEHICLE_INDEX_FROM_ENTITY_INDEX
Hash
0xDF1E5AAC561AFC59
Namespace
Returns
Vehicle
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local vehicle = Citizen.InvokeNative(0xDF1E5AAC561AFC59, -- GET_VEHICLE_INDEX_FROM_ENTITY_INDEX
  PlayerPedId(), -- Entity entity
  Citizen.ResultAsInteger()
)
print(vehicle)
JavaScript
const vehicle = Citizen.invokeNative("0xDF1E5AAC561AFC59", // GET_VEHICLE_INDEX_FROM_ENTITY_INDEX
  PlayerPedId(), // Entity entity
  Citizen.resultAsInteger()
);
console.log(vehicle)
C#
int vehicle = Function.Call<int>((Hash)0xDF1E5AAC561AFC59, // GET_VEHICLE_INDEX_FROM_ENTITY_INDEX
  API.PlayerPedId() // Entity entity
);
All ENTITY natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.