EntityClient

getEntityAttachedTo

GET_ENTITY_ATTACHED_TO0x48C2BED9180FE123

The GTA V native GET_ENTITY_ATTACHED_TO of the ENTITY namespace, as LS:MP client scripts call it: the global function getEntityAttachedTo, in JavaScript and in Lua.

SignatureJavaScript
getEntityAttachedTo(entity: Entity): Entity
SignatureLua
getEntityAttachedTo(entity: Entity): Entity

Usage

JavaScript
const result = getEntityAttachedTo(entity);
Lua
local result = getEntityAttachedTo(entity)

Parameters

ParameterTypeJavaScriptLua
entityEntitynumberinteger

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
Entity ENTITY
In the game
Entity GET_ENTITY_ATTACHED_TO(Entity entity)
Hash
0x48C2BED9180FE123

Open in the interactive natives reference