EntityClient

setEntityCanOnlyBeDamagedByEntity

SET_ENTITY_CAN_ONLY_BE_DAMAGED_BY_ENTITY0xB17BC6453F6CF5AC

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

SignatureJavaScript
setEntityCanOnlyBeDamagedByEntity(entity1: Entity, entity2: Entity): void
SignatureLua
setEntityCanOnlyBeDamagedByEntity(entity1: Entity, entity2: Entity)

Usage

JavaScript
setEntityCanOnlyBeDamagedByEntity(entity1, entity2);
Lua
setEntityCanOnlyBeDamagedByEntity(entity1, entity2)

Parameters

ParameterTypeJavaScriptLua
entity1Entitynumberinteger
entity2Entitynumberinteger

Returns

Nothing. In JavaScript the call evaluates to undefined.

Reference

Namespace
Entity ENTITY
In the game
void SET_ENTITY_CAN_ONLY_BE_DAMAGED_BY_ENTITY(Entity entity1, Entity entity2)
Hash
0xB17BC6453F6CF5AC
Introduced
Game build 944 legacy numbering

Open in the interactive natives reference