Native referenceFiveM

SET_ENTITY_AS_MISSION_ENTITY

0xAD738C3085FE7E11 ENTITY
FUNCTION SIGNATURE
void SET_ENTITY_AS_MISSION_ENTITY(Entity entity, BOOL scriptHostObject, BOOL bGrabFromOtherScript);
Property Value
Native Name SET_ENTITY_AS_MISSION_ENTITY
Hash 0xAD738C3085FE7E11
Return Type void
Parameters entity (Entity), scriptHostObject (BOOL), bGrabFromOtherScript (BOOL)

Description: Assigns an existing entity to be owned by the current script. If the entity was not owned by a script yet, this also means the entity will remain persistent until released.

Note that this is not needed right after creating an entity as a script-created entity will automatically be assigned.

Parameters

  • entity (Entity) — An entity handle.
  • scriptHostObject (BOOL) — Whether or not to assign script info to this entity, if set to false the entity will only be protected from despawning locally.
  • bGrabFromOtherScript (BOOL) — Changes the entity so it's owned by the current script if the entity is already a mission entity. This will only work on entities the machine has control of (non-remote entities).
Back to ENTITY