GET_ENTITY_ADDRESS
Returns the memory address of an entity.
Signature
Any* GET_ENTITY_ADDRESS(Entity entity);Parameters
| Name | Type | Description |
|---|---|---|
entity | Entity | The handle of the entity to get the address of. |
Returns Any* — A pointer containing the memory address of the entity.
Description
Experimental: This native may be altered or removed in future versions of CitizenFX without warning.
Returns the memory address of an entity.
This native is intended for singleplayer debugging, and may not be available during multiplayer.
Usage
local retval = GetEntityAddress(entity)
-- always works, by hash
local retval = Citizen.InvokeNative(0x9a3144bc, entity, Citizen.ResultAsLong())JavaScript and C#
const retval = GetEntityAddress(entity);
// by hash
const retval = Citizen.invokeNative('0x9a3144bc', entity, Citizen.returnResultAnyway(), Citizen.resultAsLong());long retval = Function.Call<long>((Hash)0x9a3144bc, entity);Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.