EntityClient

getLastEntityHitByEntity

_GET_LAST_ENTITY_HIT_BY_ENTITY0xA75EE4F689B85391

The GTA V native _GET_LAST_ENTITY_HIT_BY_ENTITY of the ENTITY namespace, as LS:MP client scripts call it: the global function getLastEntityHitByEntity, in JavaScript and in Lua.

SignatureJavaScript
getLastEntityHitByEntity(entity: Entity): Entity
SignatureLua
getLastEntityHitByEntity(entity: Entity): Entity

Usage

JavaScript
const result = getLastEntityHitByEntity(entity);
Lua
local result = getLastEntityHitByEntity(entity)

Parameters

ParameterTypeJavaScriptLua
entityEntitynumberinteger

Returns

Entity JavaScript number, Lua integer

Game handle of an entity: a ped, a vehicle or an object. Not an LS:MP netId. Convert one with lsmp.getEntityFromNetId.

Reference

Namespace
Entity ENTITY
In the game
Entity _GET_LAST_ENTITY_HIT_BY_ENTITY(Entity entity)
Hash
0xA75EE4F689B85391
Introduced
Game build 2802 legacy numbering

Open in the interactive natives reference