EntityClientChecked by LS:MP

setEntityAsMissionEntity

SET_ENTITY_AS_MISSION_ENTITY0xAD738C3085FE7E11

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

SignatureJavaScript
setEntityAsMissionEntity(
  entity: Entity,
  bScriptHostObject: boolean,
  bGrabFromOtherScript: boolean
): void
SignatureLua
setEntityAsMissionEntity(
  entity: Entity,
  bScriptHostObject: boolean,
  bGrabFromOtherScript: boolean
)

Usage

JavaScript
setEntityAsMissionEntity(entity, bScriptHostObject, bGrabFromOtherScript);
Lua
setEntityAsMissionEntity(entity, bScriptHostObject, bGrabFromOtherScript)

Parameters

ParameterTypeJavaScriptLua
entityEntitynumberinteger
bScriptHostObjectBOOLbooleanboolean
bGrabFromOtherScriptBOOLbooleanboolean

Returns

Nothing. In JavaScript the call evaluates to undefined.

On LS:MP

ℹ
Resource scope

Pass false or 0 for bGrabFromOtherScript. A nonzero value raises an error.

Notes

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

Makes the specified entity (ped, vehicle or object) persistent. Persistent entities will not automatically be removed by the engine.

Reference

Namespace
Entity ENTITY
In the game
void SET_ENTITY_AS_MISSION_ENTITY(Entity entity, BOOL bScriptHostObject, BOOL bGrabFromOtherScript)
Hash
0xAD738C3085FE7E11

Open in the interactive natives reference