NetworkClient

networkSetEntityOnlyExistsForParticipants

NETWORK_SET_ENTITY_ONLY_EXISTS_FOR_PARTICIPANTS0xF1CA12B18AEF5298

The GTA V native NETWORK_SET_ENTITY_ONLY_EXISTS_FOR_PARTICIPANTS of the NETWORK namespace, as LS:MP client scripts call it: the global function networkSetEntityOnlyExistsForParticipants, in JavaScript and in Lua.

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

Usage

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

Parameters

ParameterTypeJavaScriptLua
entityEntitynumberinteger
toggleBOOLbooleanboolean

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

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

if set to true other network players can't see it
if set to false other network player can see it


^^ I attempted this by grabbing an object with getEntityPlayerIsFreeAimingAt and setting this naive no matter the toggle he could still see it.

pc or last gen?

^^ last-gen

Reference

Namespace
Network NETWORK
In the game
void NETWORK_SET_ENTITY_ONLY_EXISTS_FOR_PARTICIPANTS(Entity entity, BOOL toggle)
Hash
0xF1CA12B18AEF5298
Formerly
_NETWORK_SET_ENTITY_VISIBLE_TO_NETWORK _NETWORK_SET_ENTITY_INVISIBLE_TO_NETWORK

Open in the interactive natives reference