getEntityModel
GET_ENTITY_MODEL0x9F47B058362C84B5The GTA V native GET_ENTITY_MODEL of the ENTITY namespace, as LS:MP client scripts call it: the global function getEntityModel, in JavaScript and in Lua.
getEntityModel(entity: Entity): HashgetEntityModel(entity: Entity): HashUsage
const hash = getEntityModel(entity);local hash = getEntityModel(entity)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
entity | Entity | number | integer |
Returns
Hash JavaScript number, Lua integerA game hash. Natives return it unsigned (0 to 4294967295), the value lsmp.hash gives. As an argument, the signed and unsigned forms of a hash are the same value.
On LS:MP
This native reads the entity's archetype without checking that it exists. On an entity whose archetype is missing the game goes down on the spot, and doesEntityExist does not protect you. Do not call it on a handle that came back from a shape test or from lsmp.raycast. The type natives (isEntityAPed, isEntityAVehicle, isEntityAnObject) are safe. See Coverage.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Returns the model hash from the entity
Reference
- Namespace
- Entity ENTITY
- In the game
Hash GET_ENTITY_MODEL(Entity entity)- Hash
0x9F47B058362C84B5