_GET_LAST_ENTITY_TO_DAMAGE_ENTITY
Returns the last entity that dealt damage to the specified entity.
Hash
0xAF72EC7E1B54539BRuntime name
GetLastEntityToDamageEntityNamespaceENTITY
SideClient
NameCommunity guess
Docs
Since build1311
Signature
Entity _GET_LAST_ENTITY_TO_DAMAGE_ENTITY(Entity entity);Parameters
| Name | Type | Description |
|---|---|---|
entity | Entity | — |
Returns Entity
Description
Returns the last entity that dealt damage to the specified entity.
Returns 0 if no valid attacker is found.
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
local retval = GetLastEntityToDamageEntity(entity)
-- always works, by hash
local retval = Citizen.InvokeNative(0xAF72EC7E1B54539B, entity, Citizen.ResultAsInteger())JavaScript and C#
const retval = GetLastEntityToDamageEntity(entity);
// by hash
const retval = Citizen.invokeNative('0xAF72EC7E1B54539B', entity, Citizen.returnResultAnyway(), Citizen.resultAsInteger());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
InvokeNativewith the hash — it always works.
Sources
alloc8or RDR3 NativeDB · VORPCORE RDR3natives
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.