Interface IEntity
Inherited Members
Namespace: AltV.Net.Elements.Entities
Assembly: AltV.Net.dll
Syntax
public interface IEntity : ISharedEntity, IWorldObject, ISharedWorldObject, IBaseObject, ISharedBaseObject, INative
Properties
| Improve this Doc View SourceCollision
Get or set collision of the entity.
Declaration
bool Collision { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Exceptions
| Type | Condition |
|---|---|
| EntityRemovedException | This entity was removed |
NetworkOwner
Get the network owner, or null if none is present
Declaration
IPlayer NetworkOwner { get; }
Property Value
| Type | Description |
|---|---|
| IPlayer |
Exceptions
| Type | Condition |
|---|---|
| EntityRemovedException | This entity was removed |
Rotation
Get or set rotation of the entity.
Declaration
Rotation Rotation { get; set; }
Property Value
| Type | Description |
|---|---|
| Rotation |
Exceptions
| Type | Condition |
|---|---|
| EntityRemovedException | This entity was removed |
Streamed
Get or set if the entity should be streamed.
Declaration
bool Streamed { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Exceptions
| Type | Condition |
|---|---|
| EntityRemovedException | This entity was removed |
StreamingDistance
Declaration
uint StreamingDistance { get; set; }
Property Value
| Type | Description |
|---|---|
| System.UInt32 |
Timestamp
Declaration
uint Timestamp { get; }
Property Value
| Type | Description |
|---|---|
| System.UInt32 |
Visible
Get or set visibility of the entity.
Declaration
bool Visible { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Exceptions
| Type | Condition |
|---|---|
| EntityRemovedException | This entity was removed |
Methods
| Improve this Doc View SourceAttachToEntity(IEntity, String, String, Position, Rotation, Boolean, Boolean)
Attaches the entity to another entity.
Declaration
void AttachToEntity(IEntity entity, string otherBone, string ownBone, Position position, Rotation rotation, bool collision, bool noFixedRotation)
Parameters
| Type | Name | Description |
|---|---|---|
| IEntity | entity | |
| System.String | otherBone | |
| System.String | ownBone | |
| Position | position | |
| Rotation | rotation | |
| System.Boolean | collision | |
| System.Boolean | noFixedRotation |
AttachToEntity(IEntity, UInt16, UInt16, Position, Rotation, Boolean, Boolean)
Attaches the entity to another entity.
Declaration
void AttachToEntity(IEntity entity, ushort otherBoneId, ushort ownBoneId, Position position, Rotation rotation, bool collision, bool noFixedRotation)
Parameters
| Type | Name | Description |
|---|---|---|
| IEntity | entity | |
| System.UInt16 | otherBoneId | |
| System.UInt16 | ownBoneId | |
| Position | position | |
| Rotation | rotation | |
| System.Boolean | collision | |
| System.Boolean | noFixedRotation |
DeleteStreamSyncedMetaData(String)
Deletes stream synced meta data from an entity.
Declaration
void DeleteStreamSyncedMetaData(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | key |
Remarks
Stream synced meta data is accessible across different serverside resources and across all clients within the streaming range of the clients.
Detach()
Detaches the entity from its attached entity.
Declaration
void Detach()
ResetNetworkOwner()
Resets the net owner of the current entity and set it to default calculations.
Declaration
void ResetNetworkOwner()
SetNetworkOwner(IPlayer, Boolean)
Set the net owner of the current entity.
Declaration
void SetNetworkOwner(IPlayer player, bool disableMigration = true)
Parameters
| Type | Name | Description |
|---|---|---|
| IPlayer | player | The player that is the net owner of this entity |
| System.Boolean | disableMigration | Setting this true will prevent other players getting network owner. |
SetStreamSyncedMetaData(Dictionary<String, Object>)
Declaration
void SetStreamSyncedMetaData(Dictionary<string, object> metaData)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.Dictionary<System.String, System.Object> | metaData |
SetStreamSyncedMetaData(String, in MValueConst)
Set synced meta data of the entity.
Declaration
void SetStreamSyncedMetaData(string key, in MValueConst value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | key | |
| MValueConst | value |
Remarks
Stream synced meta data is accessible across different serverside resources and across all clients within the streaming range of the clients.
Exceptions
| Type | Condition |
|---|---|
| EntityRemovedException | This entity was removed |
SetStreamSyncedMetaData(String, Object)
Set synced meta data of the entity.
Declaration
void SetStreamSyncedMetaData(string key, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | key | |
| System.Object | value |
Remarks
Stream synced meta data is accessible across different serverside resources and across all clients within the streaming range of the clients.
Exceptions
| Type | Condition |
|---|---|
| EntityRemovedException | This entity was removed |