GET_ENTITY_ATTACHED_TO
Gets the entity that this entity is attached to.
Signature
Entity GET_ENTITY_ATTACHED_TO(Entity entity);Parameters
| Name | Type | Description |
|---|---|---|
entity | Entity | The entity to check. |
Returns Entity — The attached entity handle. 0 returned if the entity is not attached.
Description
Gets the entity that this entity is attached to.
Usage
local retval = GetEntityAttachedTo(entity)
-- always works, by hash
local retval = Citizen.InvokeNative(0xfe1589f9, entity, Citizen.ResultAsInteger())JavaScript and C#
const retval = GetEntityAttachedTo(entity);
// by hash
const retval = Citizen.invokeNative('0xfe1589f9', entity, Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0xfe1589f9, entity);Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.