RedM Natives

_GET_LAST_ENTITY_TO_DAMAGE_ENTITY

Returns the last entity that dealt damage to the specified entity.

Hash0xAF72EC7E1B54539B
Runtime nameGetLastEntityToDamageEntity
NamespaceENTITY
SideClient
NameCommunity guess
Docs
Since build1311

Signature

Entity _GET_LAST_ENTITY_TO_DAMAGE_ENTITY(Entity entity);

Parameters

NameTypeDescription
entityEntity—

Returns Entity

Description

alloc8or RDR3 NativeDB

Returns the last entity that dealt damage to the specified entity.
Returns 0 if no valid attacker is found.

VORPCORE RDR3natives

Returns the last entity that dealt any damage to the specified entity.
This native appears to retrieve the attacker responsible for the most recent damage event on the given entity.

Usage

Lua
local retval = GetLastEntityToDamageEntity(entity)

-- always works, by hash
local retval = Citizen.InvokeNative(0xAF72EC7E1B54539B, entity, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetLastEntityToDamageEntity(entity);

// by hash
const retval = Citizen.invokeNative('0xAF72EC7E1B54539B', entity, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0xAF72EC7E1B54539B, entity);
  • The name is a community guess and may change. If the named call is missing in your client build, use InvokeNative with the hash — it always works.

Sources

alloc8or RDR3 NativeDB · VORPCORE RDR3natives

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