SetEntityAsMissionEntity — FiveM Natives
0xAD738C3085FE7E11 · ENTITY · all
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
| Name | Type | Description |
|---|---|---|
| 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). |
Returns
void