EntityClient

hasEntityBeenDamagedByEntity

HAS_ENTITY_BEEN_DAMAGED_BY_ENTITY0xC86D67D52A707CF8

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

SignatureJavaScript
hasEntityBeenDamagedByEntity(
  entity1: Entity,
  entity2: Entity,
  p2: boolean
): boolean
SignatureLua
hasEntityBeenDamagedByEntity(
  entity1: Entity,
  entity2: Entity,
  p2: boolean
): boolean

Usage

JavaScript
const result = hasEntityBeenDamagedByEntity(entity1, entity2, p2);
Lua
local result = hasEntityBeenDamagedByEntity(entity1, entity2, p2)

Parameters

ParameterTypeJavaScriptLua
entity1Entitynumberinteger
entity2Entitynumberinteger
p2BOOLbooleanboolean

Returns

BOOL JavaScript boolean, Lua boolean

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Entity 1 = Victim
Entity 2 = Attacker

p2 seems to always be 1

Reference

Namespace
Entity ENTITY
In the game
BOOL HAS_ENTITY_BEEN_DAMAGED_BY_ENTITY(Entity entity1, Entity entity2, BOOL p2)
Hash
0xC86D67D52A707CF8

Open in the interactive natives reference