CutscenesClient

getEntityIndexOfCutsceneEntity

GET_ENTITY_INDEX_OF_CUTSCENE_ENTITY0x0A2E9FDB9A8C62F6

The GTA V native GET_ENTITY_INDEX_OF_CUTSCENE_ENTITY of the CUTSCENE namespace, as LS:MP client scripts call it: the global function getEntityIndexOfCutsceneEntity, in JavaScript and in Lua.

SignatureJavaScript
getEntityIndexOfCutsceneEntity(
  cutsceneEntName: string,
  modelHash: Hash
): Entity
SignatureLua
getEntityIndexOfCutsceneEntity(
  cutsceneEntName: string,
  modelHash: Hash
): Entity

Usage

JavaScript
const entity = getEntityIndexOfCutsceneEntity(cutsceneEntName, modelHash);
Lua
local entity = getEntityIndexOfCutsceneEntity(cutsceneEntName, modelHash)

Parameters

ParameterTypeJavaScriptLua
cutsceneEntNamestringstringstring
modelHashHashnumberinteger

Returns

Entity JavaScript number, Lua integer

Game handle of an entity: a ped, a vehicle or an object. Not an LS:MP netId. Convert one with lsmp.getEntityFromNetId.

Reference

Namespace
Cutscenes CUTSCENE
In the game
Entity GET_ENTITY_INDEX_OF_CUTSCENE_ENTITY(const char* cutsceneEntName, Hash modelHash)
Hash
0x0A2E9FDB9A8C62F6

Open in the interactive natives reference