DeleteEntity
Is equal to the standard one but request the control of the entity to prevent any deletion bug and set the entity as mission entity, can accept a netId
Argument | Data Type | Needed | Default | Description |
---|---|---|---|---|
Entity | entity/netId | - | The entity handle or the netId of the entity | |
IsNetwork | boolean | false | If is true the entity arguments become the netId and find and delete the entity by the netId |
Dont need to be called every frame
Example
Using entity handle
DeleteEntity(entity, false)
DeleteEntity(netId, true)
Old method
SetEntityAsMissionEntity(entity)
DeleteEntity(entity)
Old method problem
Sometimes the entity is not deleted because the entity was created by another client
Using old native
although i dont recommend it, you can use the old native via old_DeleteEntity
Last update: April 12, 2022
Created: June 27, 2021
Created: June 27, 2021