RedM Natives

GET_ENTITY_ADDRESS

Returns the memory address of an entity.

Hash0x9A3144BC
Runtime nameGetEntityAddress
NamespaceCFX
SideClient
NameOfficial
Docs

Signature

Any* GET_ENTITY_ADDRESS(Entity entity);

Parameters

NameTypeDescription
entityEntity

The handle of the entity to get the address of.

Returns Any* — A pointer containing the memory address of the entity.

Description

Cfx.re native reference

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

Lua
local retval = GetEntityAddress(entity)

-- always works, by hash
local retval = Citizen.InvokeNative(0x9a3144bc, entity, Citizen.ResultAsLong())
JavaScript and C#
JavaScript
const retval = GetEntityAddress(entity);

// by hash
const retval = Citizen.invokeNative('0x9a3144bc', entity, Citizen.returnResultAnyway(), Citizen.resultAsLong());
C#
long retval = Function.Call<long>((Hash)0x9a3144bc, entity);

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.