EntityClient

setEntityOnlyDamagedByPlayer

SET_ENTITY_ONLY_DAMAGED_BY_PLAYER0x79F020FF9EDC0748

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

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

Usage

JavaScript
setEntityOnlyDamagedByPlayer(entity, toggle);
Lua
setEntityOnlyDamagedByPlayer(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_ONLY_DAMAGED_BY_PLAYER(Entity entity, BOOL toggle)
Hash
0x79F020FF9EDC0748

Open in the interactive natives reference