EntityClient

setEntityCanOnlyBeDamagedByScriptParticipants

SET_ENTITY_CAN_ONLY_BE_DAMAGED_BY_SCRIPT_PARTICIPANTS0x352E2B5CF420BF3B

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

SignatureJavaScript
setEntityCanOnlyBeDamagedByScriptParticipants(
  entity: Entity,
  toggle: boolean
): void
SignatureLua
setEntityCanOnlyBeDamagedByScriptParticipants(
  entity: Entity,
  toggle: boolean
)

Usage

JavaScript
setEntityCanOnlyBeDamagedByScriptParticipants(entity, toggle);
Lua
setEntityCanOnlyBeDamagedByScriptParticipants(entity, toggle)

Parameters

ParameterTypeJavaScriptLua
entityEntitynumberinteger
toggleBOOLbooleanboolean

Returns

Nothing. In JavaScript the call evaluates to undefined.

Reference

Namespace
Entity ENTITY
In the game
void SET_ENTITY_CAN_ONLY_BE_DAMAGED_BY_SCRIPT_PARTICIPANTS(Entity entity, BOOL toggle)
Hash
0x352E2B5CF420BF3B
Introduced
Game build 573 legacy numbering

Open in the interactive natives reference